Try to not use Invoke, read the comment about it:
Code:
/**
* Calls an ActionScript function on the movie, with the values from the args array as its parameters. This is slower than creating a wrapper function to call the ActionScript method
* using one of the ActionScript*() methods below, but does not require a subclass to implement. Use this for one-off functions, or functions with variable length arguments
*/
native function ASValue Invoke(string method, array<ASValue> args);
Instead use one of these considering the return variable type:
Code:
protected native noexport final function ActionScriptVoid(string path);
protected native noexport final function int ActionScriptInt(string path);
protected native noexport final function float ActionScriptFloat(string path);
protected native noexport final function string ActionScriptString(string path);
protected native noexport final function GFxObject ActionScriptObject(string path);
protected native noexport final function GFxObject ActionScriptConstructor(string classname);
Hope it helps for the performace and all.
Bookmarks