Flash与JS交互
[code]-------------------------------------------------ActionScript----------------------------------------------------------------------------- import flash.external.*; //注册命名控件 var methodName:String="sender"; //JS回调函数 var instanceL:Object=null; var method:Function=receive; //FLASH接收函数 var vBoll=ExternalInterface.addCallback (methodName, instance, method); //FLASH注册 function receive(msg:String) { TT.text="ab"; } TT.text=vBoll;
------------------------------------------------JavaScript-------------------------------------------------------------------------------- document.getElementById('as_js').sender('ab'); //JS调用Flash[/code]