| Package | com.doitflash.tools |
| Class | public class DynamicFunc |
| Inheritance | DynamicFunc Object |
myFunc
and you may optionally send different styles of arguments to that function, it supports arguments in form of
simple strings, arrays or objects.
myFunc(val1,val2,[arr1,arr2,arr3],{var1:value1,var2:value2,var3:value3})
function myFunc($str1:String, $str2:String, $arr:Array, $obj:Object):void
{
trace($str1);
trace($str2);
trace($arr);
trace($obj);
}
| Property | Defined By | ||
|---|---|---|---|
| funcName : String [read-only]
returns the function name in string type
| DynamicFunc | ||
| inputs : Array [read-only]
returns all arguments, if any, for the function. | DynamicFunc | ||
| Method | Defined By | ||
|---|---|---|---|
DynamicFunc($str:String)
initialize the class and send your string to be converted to a function call. | DynamicFunc | ||
| funcName | property |
funcName:String [read-only] returns the function name in string type
public function get funcName():String| inputs | property |
inputs:Array [read-only] returns all arguments, if any, for the function.
public function get inputs():Array| DynamicFunc | () | Constructor |
public function DynamicFunc($str:String)
initialize the class and send your string to be converted to a function call.
$str:String |
See also
var myString:String = "myFunc(value,value2,[arr1,arr2,arr3],{var1:value1,var2:value2,var3:value3})";
var df:DynamicFunc = new DynamicFunc(myString);
this[df.funcName].apply(null, df.inputs);
function myFunc($str1:String, $str2:String, $arr:Array, $obj:Object):void
{
trace($str1);
trace($str2);
trace($arr);
trace($obj);
}