Flex Component, Self Reference

Posted on 31 August 2008

I receive this questions quite often, “How do I self reference a Flex component?” — The answer is quite simple and obvious, however it is easily over looked.

Use the event object within the component along with currentTarget to set / get parameters from the current component.
An example click event to change the visibility of a component from within itself would be:
click=”event.currentTarget.visible=false;”
Enjoy.

1 Response to Flex Component, Self Reference

  • mpavic says:

    Yo save my life, I’m try with .this.visible=false and nothing after 4 hours I find you solution THANKS a LOOOOT.

  • Recent Posts

    Tag Cloud

    172p Aanval App Apple Blackberry boeing book cessna Cocoa Coda Conference DEFCON development Eclipse Expose Facebook final cut pro Flash Builder flex Flex Builder flight Gaming hacking IDS ios iPad iPhone IVNUA m-audio Objective-C OS X packt paine performance Press publishing Security Snort snow leopard Speaking syslog tactical flex tune-up video Xcode

    Meta

    Loyal Moses is proudly powered by WordPress and the SubtleFlux theme.

    Copyright © Loyal Moses