3 回答

TA貢獻(xiàn)2037條經(jīng)驗(yàn) 獲得超6個(gè)贊
import flash.events.KeyboardEvent;
import flash.display.MovieClip;
stop();
var zhanzi:MovieClip;
var mc:MovieClip = new dasheti;
stage.addEventListener(KeyboardEvent.KEY_DOWN, dasheti1);
function dasheti1(e:KeyboardEvent):void
{
if(e.keyCode == 85)this.removeChild(zhanzi)
if(e.keyCode == 85)this.addChild(mc)
mc.x = zhanzi.x + 100;
mc.y = zhanzi.y
mc.height = zhanzi.height;
mc.width = zhanzi.width;
mc.addEventListener(Event.ENTER_FRAME,refresh);//在mc播放的時(shí)候添加逐幀的監(jiān)聽
}
function refresh(e:Event):void
{
if (mc.currentFrame == 64)
{
trace("125");
}
}

TA貢獻(xiàn)1831條經(jīng)驗(yàn) 獲得超9個(gè)贊
提供教科書,if 語句檢查該語句括號(hào)中的值或表達(dá)式。如果值為 true,則執(zhí)行大括號(hào)中的代碼行;否則,將忽略它們。
if (age < 20)
{
trace("顯示針對(duì)青少年的特殊內(nèi)容")
}
- 3 回答
- 0 關(guān)注
- 208 瀏覽
添加回答
舉報(bào)