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..

Advertisements

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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: