You can access the thing that sends the event in your listener - the guy
before did not give you the entire signature for an event listener
function (you pass the event in the MXML tag and add it as the argument
to the function - same with any handler, you can specify what goes in
the function argument, by default the click rollover and other Flex
events will have an object associated with them that you can pass around):
<mx:Script>
<![CDATA[
public function clickHandler(event:Event):void {
trace("clickHandler from: " + event.target + " type " + event.type);
}
]]>
</mx:Script>
<mx:Button id="btn" styleName="navButton" click="clickHandler(event)"
label="myButton"/>
Hey presto, you can wrap this event up and fire it again from this
component upto the top. That's the only awkward bit as you have to
write code for each. There may be other ways / frameworks like Jason
said that ensure you don't have to write these bits of code in every
nested component to pass an event from bottom to top, but I have not
investigated / learnt about this stuff.
HTH
Glen
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders