AS3: Delay Enter Frame Animation
-
29-10-2019 - |
Question
I've got a fade out animation using ENTER_FRAME. I want the fade out to start after 2-3 seconds. How can I create this delay?
txtAlert.addEventListener(Event.ENTER_FRAME,animAlert);
function animAlert(e:Event) {
if(e.target.alpha>0) {
e.target.alpha-=0.01;
} else {
e.target.parent.removeChild(e.target);
e.target.removeEventListener(Event.ENTER_FRAME,animAlert);
}
}
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow