home   |   about   |   time   |   appearance   |   space   |   other   |   tips & tricks    

Tips & Tricks

Frame By Frame Loop

A frame by frame loop is a repetitive structure which occurs once each frame (the time delay). It's very important in Professional Work because it gives the possibility of changing aspects in the Movie with the highest speed, creating cool motions, transitions etc. We used this technique in most of this website's effects but in two different ways: using only Action Script on three frames, and using some special features of the Movie Clips.

Let's take a simple repetitive structure:

do
 //here we write what we want to loop
until( condition = true )
 // here is what we want to happen after

Three frames version:

In the Main timeline you need three keyframes in the positions 1,2,3; here is the code for each one:

Frame1: //the code for what we want to loop
Frame2: if( condition = true) play();
            else gotoAndPlay(1);
Frame3: stop();
        // the code for what we want to happen after

Movie Clip version:

What you need for this one is two keyframes with a Movie Clip on the first one. We will use the function "onClipevent(enterFrames)" which is invoked each time the Clip enters a new Frame.

Click the Symbol and add something like this:

onClipEvent( enterFrames ) {
	// the code for what we want to loop
	if( condition = true )
		_parent.play;
}

Frame1: stop();
Frame2: stop();
        // the code for what we want to happen after

Check out our examples in the previous chapters, to understand the importance of this special kind of looping.