Pass Multiple Parameters to functions in flex.

Any number of parameters can be passed to the functions and here iam passing using by defining a function with three parameters init.Like below..

<mx:Button id=”btnone” label=”one” click=”passpara(‘one’,’two’,’three’)” x=”386″ y=”209″/>

so here on click of this button the function is called and three parameters are passed toit.and iam receiving the values with three srtings defined..

<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function passpara(one:String,two:String,three:String):void
{
Alert.show(“”+one+two+three,” “);
}
]]>
</mx:Script>

The above alert displays the values of three strings..

One Response to Pass Multiple Parameters to functions in flex.

  1. Dibya Ranjan Patnaik says:

    Thanx Kumar it came out helpfull to me.

    Regards
    Dibya Ranjan Patnaik
    Relyon Softech Ltd.
    Bangalore

Leave a comment