|
Note: This is just a little stand-allone insight into one special feature of Flash 2. Knowledge bases and tutorials are growing slowly. Aside of the documentation on Macromedia's site, John Croteau's Flash Tech Resource is most comprehensive. You will even find a little movie there which illustrates "Wait for frame"... To see "Wait for frame" in action, go to our Inter-Clip Showcase! WAIT FOR FRAME - Complete Edition
if (wait_frame downloaded) {
goto target_frame
} else {
keep going;
}
where wait_frame = current frame + extra frames and target_frame is the frame that you enter in action-properties>Frame: (current frame = the frame where you insert the frame action, extra frames = Action-Properties>extra frames) Now, two things are weird at that:
So much for 'intuition'... However, knowing all that it's pretty clear what you need to do: Let me do that with examples:A: Say, you have a movie with 500 frames. You want to make sure that frame 300 is loaded before you start to play (the numbers are just for the sample - you'd have to test what works for you). Solution:
B: Say, you have a menu that is complete in frame 100 (after some initial animation). Your menu buttons jump to different frames later on in the movie. Now, you want to make sure that each button doesn't get displayed before its 'Goto-frame' is loaded. Solution: Build a loop as in the first example before the frame that displays each button. (say in frames 102 and 103 for the first button - which will be displayed in frame 104) Action-Properties:
Note: If you use multiple scenes, the frames just keep counting. If you Export Movie... with 'Generate Size Report' enabled, you get a nice sheet where the running frame numbers are in the first column, and each scene has its tag in the corresponding row in the last column. Since the entire procedure can be quite a hassle, you should not want to change anything at your movie after you insert the 'Wait for frame' stuff! Otherwise, you'll have to do it all over again, because the numbers that you've entered don't follow your changes... New (09/15/97):You can also use "Wait for frame" to avoid that an intro of a movie that ends with a menu plays again when your vistor comes back to the movie after having browsed one of the menu options. (A common problem is that IE and NN handle this situation differently. However, with "Wait for frame" you can easily overcome the differences without scripting!) Here's how:
That's it! No loop in this case, since you want to continue to play and load the movie if it's not cached. |