Actionscript 3 actionscript进程延迟?
我想知道我怎样才能让一个tween在执行之前多等几秒钟?我的代码如下:Actionscript 3 actionscript进程延迟?,actionscript-3,flash,flash-cs5,Actionscript 3,Flash,Flash Cs5,我想知道我怎样才能让一个tween在执行之前多等几秒钟?我的代码如下: btn_1.addEventListener(MouseEvent.CLICK, about_navigate); function about_navigate(event:MouseEvent):void { topbarTween.yoyo(); //how to make the below tween wait 2 seconds before it i
btn_1.addEventListener(MouseEvent.CLICK, about_navigate);
function about_navigate(event:MouseEvent):void
{
topbarTween.yoyo();
//how to make the below tween wait 2 seconds before it is carried out
btmTween.yoyo();
}
我是AS3新手,因此非常感谢您的帮助 我不认为原生的
Tween
类有内置的延迟方法(就像大多数第三方解决方案一样-尽管如果我错了,请有人纠正我)
您可以使用flash.utils.setTimeout
或计时器
function about_navigate(event:MouseEvent):void
{
topbarTween.yoyo();
setTimeout(btmTween.yoyo,2000);
}
你在用土生土长的特温图书馆吗?或者像TweenLite/Tweener/Gtween这样的第三方软件?我正在使用本机库只是一个简单的问题:var myRotationTween:Tween=newTween(content_mc,“rotation”,Elastic.easeOut,content_mc.rotation,content_mc.rotation-90,3,true);设置超时(myRotationTween,500);