开发者

as3, function active after 3 seconds

开发者 https://www.devze.com 2022-12-17 17:58 出处:网络
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);

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

精彩评论

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