Skip to content
seanhess edited this page Sep 13, 2010 · 2 revisions

You can use Call to call a local method when something happens. You can call any function you have a reference to, and can use SmartObject to get a reference to the button that was clicked.

Example

Usage

<mx:Script>
    <![CDATA[
        private function message(value:String):void
        {
            trace(value);
        }
    ]]>
</mx:Script>

<SmartObject id="currentTarget"/>

<Selector match="Button">
    <Listener event="click">
        <Call method="{this.message}" arguments="{currentTarget.label}"/>
    </Listener>
</Selector>
Clone this wiki locally