如何修复“ addChild(locked_jwb);”仅在第3帧显示

时间:2019-07-06 00:48:53

标签: actionscript-3

var locked_jwb:MovieClip=new sudah_jawab;

a_btn.addEventListener(MouseEvent.CLICK, ev1a);

function ev1a(event:MouseEvent):void
{
    score_ev = score_ev +1;
    gotoAndStop(4);
    addChild(locked_jwb);
    locked_jwb.x=523.15;
    locked_jwb.y=-94.05;
}

我的问题

addChild(locked_jwb);

我想要addchild ...仅在第(4)帧上

1 个答案:

答案 0 :(得分:0)

function ev1a(event:MouseEvent):void
{
        score_ev = score_ev +1;
        addChild(locked_jwb);
        locked_jwb.x=523.15;
        locked_jwb.y=-94.05;

        gotoAndStop(4); //move this down here

}

这种写作风格有很多问题,但我会追逐。您需要先设置坐标,然后再移至第4帧。