Flash Tutorials, Samples, Resources, Greetings, Games
Home | About Us | Resources | Tutorials | Links | Games | Movies | Projects | Feedback | Contact Us
Tutorials
Here you'll get tutorials for all skill levels wheather you are a new user or an expert flash developer.

» Enter
Resources
In this section you'll get some small movie clips which can be used in your flash projects with flash components, flash action scripts .as files and some other stuff that will help you in your flash projects. You can also submit your work here. For submit details please checkout our Submit Page.

» Enter
Games
Play and download great flash games. If you have any flash game, please send us, we will put it with your name.

» Enter
Movies
Flash FLA movies to download.

» Enter
Home » Tutorials



   Intermediate Level - Basic Percentage Preloader
After this tutorial you will be able to make yourself a basic preloader with percentage feature. So here we are going to learn how make a simple basic percentage preloader with simple small Loading animation.

First of all in designing part we need a dynamic text box (with variable name "myDynamicText") in which we'll show the Percentage of movie loaded. A movie clip with simple animation, you can make anything for your loading animation, i have used a simple animation with loading written and some running dots. An image or some animation later-on to check our Preloader.

Put dynamic text box and preloader animation movie clip on the first frame of layer 1. Make a new layer for action script and write this on first frame.

play();

Insert a new blank keyframe in action layer and add this script on this frame. This will check that movie is loaded or not, if loaded it will go further, otherwise it will loop in first two frames again and again.

myDynamicText = (int((getBytesLoaded() / getBytesTotal())*100) +"% loaded");
if (getBytesLoaded() != getBytesTotal())
        {
      prevFrame();
        }
else
        {
      play();
        }

Now insert in a new keyframe in your first layer to add some image or you can get your main movie after third frame. You can also copy first two frames of this movie to your main movie in first two frames of that movie to get preloader in any of your movies.

To check this preloader offline first presss Ctrl+Enter to test your movie then press Ctrl+Enter again, now it will test your movie with preloader.

Download Final Fla file