Hi All
Please look at this code below:

//define colour variable in the root timeline
var colour:String="red";

btn.onRelease=function(){
        //call variable from the btn
        trace(this._parent.colour); // trace = red, this is expected
        trace(colour); //trace = red, why is this variable accesible?
}

It seems odd to me why the "colour" variable is accessible from that
scope, if someone explains me why this happens it will be fantastic.


Here is mode complex example of this behaviour:
btn1.onRelease=function(){
        var colour:String="red";
        
        btn2.onRelease=function(){      
                trace(colour); //trace = red
        }
}





Thanks
Sebastian 

---
You are currently subscribed to fugli as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to