开发者

as3, function active after 3 seconds

I have 2 functions going in as3:

function blueDownBounce (e:MouseEvent):void {
    var blueDownY:Tween = new Tween(blue, "y", Regular.easeOut, -49, -19, 1, true);
}
blue.addEventListener(MouseEvent.MOUSE_OVER, blueDownBounce);

function blueUpBounce (e:MouseEvent):void {
    var blueUpY:Tween = new Tween(blue, "y", Bounce.easeOut, -19, -49, 1, true);
}
blue.addEventListener(MouseEvent.MOUSE_OUT, blueUpBounce);

I am trying to make it so that these functions are active after 3 seconds and they stay active for the whole time it is stopped on that frame after those 3 seconds. I know you have to make a timer and make it 开发者_如何学JAVAdependent on that timer but it wasn't working out well.

Thanks, Wade


The function needed to be defined above the timer and the event listener needed to be in the timer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜