flash调用js失败,不知道是什么原因
as代码:package{importflash.display.MovieClip;importflash.events.MouseEvent;importflash....
as代码:
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.external.ExternalInterface;
public class HelloWorld extends MovieClip {
public function HelloWorld() {
// constructor code
btnHelloWorld.addEventListener(MouseEvent.CLICK,onClick);
}
private function onClick(me:MouseEvent):void{
ExternalInterface.call("Show");
}
}
}
btnHelloWorld是一个按钮,想点击按钮时调用js中的show 展开
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.external.ExternalInterface;
public class HelloWorld extends MovieClip {
public function HelloWorld() {
// constructor code
btnHelloWorld.addEventListener(MouseEvent.CLICK,onClick);
}
private function onClick(me:MouseEvent):void{
ExternalInterface.call("Show");
}
}
}
btnHelloWorld是一个按钮,想点击按钮时调用js中的show 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询