我正在用udk做一个游戏,但是由于某种原因,在ActionScript中fscommand函数不能执行。我正在使用Adobe Flash Professional CC 30天试用版,带有UDK 2013年7月。我已经按照UDN网站(http://udn.epicgames.com/Three/SettingUpScaleformGFx.html#ActionScript 3/Scaleform4)上的说明安装了CLIK (AS3),但是Adobe Flash无法加载或识别任何CLIK ActionScript文件。
我的CLIK设置:

和我所有按钮使用的代码(唯一的区别是我调用的fscommand):
import flash.events.MouseEvent;
addEventListener(MouseEvent.MOUSE_OVER, hover);
addEventListener(MouseEvent.CLICK, clicked);
function hover(e:MouseEvent):void {
this.nextFrame();
removeEventListener(MouseEvent.MOUSE_OVER, hover);
addEventListener(MouseEvent.MOUSE_OUT, out);
}
function out(e:MouseEvent):void {
this.prevFrame();
removeEventListener(MouseEvent.MOUSE_OUT, out);
addEventListener(MouseEvent.MOUSE_OVER, hover);
}
function clicked(e:MouseEvent):void {
fscommand("singleplayer");
}发布于 2014-03-26 05:06:17
你有没有验证过clicked()函数正在被调用?尝试在其中放入trace()语句。编译SWF时,您是否看到任何编译器错误?
https://stackoverflow.com/questions/21670943
复制相似问题