Inside an onEnterFrame function you have to use "this" when referring to
things in the class (if the class extends MovieClip, which I hope it
does because only MovieClips can have onEnterFrame as far as I know).


class MyClass 
{
        var foo:Boolean;

        function MyClass() 
        {
                this.onEnterFrame = function() 
                {
                        this.foo = !this.foo;
                        this.traceFoo();
                }
        }
        function traceFoo() 
        {
                trace(foo);
        }
}
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to