How do you self-referenciate a component in MXML when calling ad AS inline function?
The previous code will throw an error, because "this" is a reference to the root of the MXML document, which is in my case the Application.Code:<mx:Script> function fadeIn(canvas:Canvas) { trace(canvas); } </mx:Script> <mx:Canvas show="fadeIn(this)"></mx:Canvas>
Is there any way to quickly pass a self reference? Or do I have to pass an ID and look for the corresponding object from within the function?




Reply With Quote