Flash Templates Tutorials - PRELOADER CHECKUP
Checking If Frame Is Loaded (FrameNumber):
It is already familiar to you "If" operator, but in this case, "FrameNumber" of a specific frame serves as a condition for verification.
Let’s consider its parameters:
The popup menu "Scene" - a scene in which we will perform the checkup, the current scene is set by default, that is, if your movie consists of one scene only, it is not necessary to change the value.
Frame - here we set a number of a specific frame, "Label" (which is more convenient), or, if we select the option "Expression", the calculated condition (is used when creating projects built on modular principle).
This conditional operator might look like this:
If Frame Is Loaded (Scene 2, "end")
Go to and Play (Scene 2, "start")
End Frame Loaded
Go to and Play (25)
Suppose this script is located at "Scene 1" in the final 30 frame. Once the first episode is finished, i.e. the movie reaches the 30th frame of the first scene, there goes the checkup – “If the second scene is loaded”. If not, the movie goes to the 25th frame of the current scene, and after the condition becomes true, that is the second scene is loaded, it launches.
Step-by-step preloaders can be used for small projects also.
For example, you have created a site menu and do not want the visitor to see how it is drawn, but want the ready picture to appear. The same goes for very large projects, each part of which lasts for a long time by itself (presentations, animations, etc.) the next scene loading during the current scene playing is possible.
To check the frame loading use framesloaded (inside of If instruction) or instruction If Frame Is Loaded in order to check whether there is a specific frame content on the local disk.
Usually, _framesloaded and If Frame Is Loaded are used to play simple animation, while the remainder of the clip is downloaded from the Internet.
The difference between these two instructions is that when using If (_framesloaded) you can easily add Else or Else If instruction. If Frame Is Loaded allows you to specify the number of frames in a simple instruction.
To use framesloaded in the set of actions which plays a short animation while the clip is loaded:
1. Create a short animation playing circle-wise at the beginning of the clip. For example, you can create a "loop" showing "loading ..." all the time.
2. Create a set of actions for the frame with If Frame Is Loaded which will make the clip "jump out" from the animation once all frames are loaded and continue the clip playing. For example, if in your clip there is some animation in the first and second frames (going between frames 1 and 2), the next action should be placed in the frame 2.
Go to and Play (3)
Go to and Play (1)
When you create If Frame is Loaded, Flash automatically inserts End If Frame is Loaded at the end of the instruction.
At the frame 2 write an action which will make the clip go back to frame 1: Go to and play (1). When the frame is loaded, the number of which is specified in If Frame is Loaded, the second frame will be ignored and the clip will be played further, starting from frame 3. If Frame is Loaded is also suitable for checking-up the part of the clip downloading, containing a large picture or a large sound file. Usually, If Frame Is Loaded is used in the set of instructions for the whole frame. But sometimes it can be used for a separate button as well.
To check such instructions, use Test Movie (in Control menu).
The clip will be loaded in the same sequence as if it was downloaded from the Internet.
If Frame Is Loaded has the following parameters: Frame - indicates the number of the frame which should be loaded completely before the next instruction is performed; Scene - a scene containing this frame.