Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

repeat actionScript

Status
Not open for further replies.

quaker93

Technical User
Jun 28, 2006
9
0
0
US

Is there anyway to have an actionScript repeat on each frame until there is another keyframe without having to copy and paste the actual code to each frame?

thanks!
tim
 
Use an onEnterFrame function, and either define a new one on the next keyframe, or delete the previous one...

this.onEnterFrame = function(){
//code to be executed here...
};

On the next keyframe, either...

delete this.onEnterFrame;

Or define a new one...

this.onEnterFrame = function(){
//new code to be executed here...
};

Regards. Web Hosting - Web Design
03/13/05 -> OLDNEWBIE VS FLASHKIT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top