RSS
email

Delay Animation in Flash using AS:



step1: Animate a ball in stage for 30 frames

step2: Paste the below code and place it in first frame

function timer_fun(delayy:Number) {
this.stop();
var timer:Number = getTimer();
var inter:Number = setInterval(function () {

if (getTimer()-timer>delayy) {
trace("here");
clearInterval(inter);
play();
}
}, 10);
}

step3: Paste the below code in Frame where you want to pause for some sec's

timer_fun(1000);//call the function in frame where you want to pause
//1000--1sec

Bookmark and Share

8 comments:

Anonymous said...

This rocks!! Thank you thank you.

Jane said...

play();
}
}, 10);
}

what does the 10 stand for? thanks!

Anonymous said...

great!!!
thank you!!!!

Anonymous said...

Thanks soooo much dude!

Unknown said...

Thank you for this tutorial, really looking for a function like this.

Anonymous said...

it dosen't work with me
please help

Anonymous said...

it dosent work with me
it comes just simple animation
plz reply me
thanks

 

Recent Posts

Recent Visitors

Donate Me

About Me

My photo
Chennai, Tamil nadu, India
Nothing more to say about me.. Just a Action Script programmer / Flex developer having 4.5 years of experience.