Percent Frames Loaded Preloader
- Import 7 gif or jpg images of measurable size.
I can argue till I'm blue in the face that people hate the preloader
and that a preload sequence is far better that entertains while the movie
loads many frames ahead, then a loader bar, but people still insist on
using a preloader sequence with percent loaded bar. Here it is based on
frames loaded.
1. In a new movie, draw a rectangle that is wide and short. Highlight the rectangle
and click Insert=> Convert to symbol called percentage and with
properties of a movie clip. Open this symbol and highlight the
rectangle inside the symbol. Set the X and Y value to 0 so that the
registration point is in the upper left corner.
2. Highlight the instance of the rectangle on the stage. Name the
instance "bar" in the instance box. Click on frame 2 of the
layer 1 and hit your F5 key. Add blank key frames to frames 3-10. 3.
Insert a layer called script. Insert keyframes in frame 1 and 2. In frame
1 we want to add a script that sets a variable that will calculate a
percentage value for the percent of frames loaded. To do this we need to
name the variable, say percentage, and set it equal to the number of
frames loaded divided by the total number of frames times 100. This is
translated in flash as percent=_framesloaded*100/_totalframes. Add this
script to frame one.
|