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

    Aanval App Apple Badger Mt. Beef book Cocoa Coda Conference Cows development Eclipse Expose F-450 Flash Builder Flex Builder Ford Gaming Horse House IDS iPad iPhone IVNUA King Ranch mac Objective-C off-grid Offgrid Office OS X Outback Press Property Ranch Reining Security Snort snow leopard Speaking tactical flex Trailer VFX Weather Xcode

    Meta

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

    Copyright © Loyal Moses