I'm surprised that even compiles...

Peter


On Nov 22, 2007 12:59 AM, Alex Harui <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
>
>
> I would avoid name collisions between functions and ids.
>
>
>
>  ________________________________
>
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Rafael Faria
>  Sent: Wednesday, November 21, 2007 4:57 PM
>  To: flexcoders@yahoogroups.com
>  Subject: [flexcoders] Flex Hierarchy
>
>
>
>
>
>
>
>
> When i understand it my life will be so much easier...
>
>  Look the code above...
>
>  see that on the function "test2" it doesnt return the proper object?
>
>  I know that exist some kind of hierarchy.... but what i couldnt get it
>  is how i get the object that is on the global scope.
>
>  i tried this.parent, this.parentDocument, this.parentApplication....
>  all of them and none of them seem to be working...
>
>  someone can help me?!!?!
>
>  thanks
>
>  <?xml version="1.0" encoding="utf-8"?>
>  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
>  creationComplete="init()">
>  <mx:Button id="test" label="Test" />
>  <mx:Canvas id="test2" label="testing" />
>  </mx:Application>
>
>  <mx:Script>
>  <![CDATA[
>  function init()
>  {
>  test();
>  test2();
>
>  function test2()
>  {
>  trace(this['test2']);
>  }
>  }
>
>  function test()
>  {
>  trace(this['test2']) // return The object i want
>  }
>
>  ]]>
>  </mx:Script>
>
>  

Reply via email to