onFSCommand( command : String, parameters : String ) : String
The idea of this function is that, should you wish to pass a command to the Neko layer, you can do so in
the most generic of terms, while not breaking existing ActionScript code. Unfortunately, the FSCommand
function can only send two parameters, both of which are of type String. However, as long as you
delimit multiple values sent as a parameter, you can quite easily reconstruct the data in the Neko layer.
Another drawback of this method is that, being asynchronous, the communication is limited to Flash to
Neko calls, incapable of even return values.
Anyway, for some purposes, this can be a great option. Take a look at how this can be put to use by
creating an app whereby the Flash layer performs a timer, and the Neko layer acts accordingly. First, the
Flash code:
import flash.Lib;
class UI extends flash.MovieClip
{
static var className : String = ???UI???;
static var register : Dynamic = flash.Lib.registerClass( className, UI );
static var count : Array < Int > = [0,0];
static var scale : Array < Int > = [0,0];
static var dir : Array < Bool >
static function main()
{
Lib.
Pages:
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963