| |
 |
June 19th, 09:02 am |
 |
Warning: fopen(userdata.php): failed to open stream: Permission denied in C:\Inetpub\vhosts\mikemania.kawanda.net\httpdocs\users.php on line 19
Warning: fwrite(): supplied argument is not a valid stream resource in C:\Inetpub\vhosts\mikemania.kawanda.net\httpdocs\users.php on line 20
Warning: fwrite(): supplied argument is not a valid stream resource in C:\Inetpub\vhosts\mikemania.kawanda.net\httpdocs\users.php on line 25
Warning: fwrite(): supplied argument is not a valid stream resource in C:\Inetpub\vhosts\mikemania.kawanda.net\httpdocs\users.php on line 32
Warning: fclose(): supplied argument is not a valid stream resource in C:\Inetpub\vhosts\mikemania.kawanda.net\httpdocs\users.php on line 33
Total users online : 1 |
 |
 |
|
|
| Simple Percentage Preloader |
|
|
| When creating lengthly or very large Flash documents, your users will usually see a blank rectangle while the file loads all the way through. By placing a preloader, you can let them see the progress the file has loaded so far. |
 |
Step #1 |
| First make a scene before your main movie, call this scene preLoader. Within this scene, make three keyframes by selecting the first keyframe and pressing F6 twice. |
 |
Step #2 |
| Now, make a textbox and select Dynamic Text in the text properties and give it the instance name of preLoader. This text box will display the loadtime by percentage. |
 |
Step #3 |
Select the first frame and press F9 to open up the actionscript window and type in the following:
| Code
\\ |
percent = Math.floor(getBytesLoaded()/getBytesTotal()*100);
preLoader.text = percent + "% is loaded"; |
|
 |
Step #4 |
In the second frame of the movie, press F9 to open up the actionscript menu and type in the following actionsript code:
| Code
\\ |
if (percent == 100){
gotoAndStop(3);
}else{
gotoAndPlay("SCENENAME,FRAME");
} |
Replace the bold letters in the code with the Scene and Frame of where you want the movie to play when the percentage reaches 100%. Note that they are seperated by a comma with no space. |
 |
Step #5 |
Remember, On the Last frame of your main movie, be sure to insert a stop variable so that the movie doesn't repeat itself.
|
 |
|
Written
by MikeMania on January 17th, 2005 |
|
 |
|
|
|