
Please support lukamaras.com website:
All my tutorials are free, while hosting costs money.
The most viewed tutorials in April:
In this tutorial, you will see how easy it is to create an internal preloader for your Flash site, complete with:
Moreover, you are going to learn:
You will also see how to make your preloader disappear and proceed onto the site once it has been loaded completely. The example below shows what you are going to learn to make with this tutorial (it is a rough animated representation of the real preloader you are going to create).
1. Open a new Flash document. Call the first layer loading bar.

2. Select the Rectangle tool (R) and block the Outline color. You can see a detailed explanation on how to do this in step 2 of my tutorial on making a mirror menu.
Draw a 150 by 5 pixel rectangle and center it on stage.
![]()
Making a rectangle with these precise dimensions can be difficult with free hand drawing, so I suggest that you adjust these values manually by entering them in the appropriate fields in the Properties panel (with the ractangle selected, of course). You'll find the width (W) and height (H) input fields in the bottom left part of the aforementioned panel.

3. Select the rectangle by clicking on it with the Selection tool (V). Select Modify > Convert to Symbol to make a movie clip out of your rectangle.
In the dialog window that appears, select Movie clip as type and call it blue loading bar. Well, you can call it anyway you like, I called it like that because I used blue as the color for the rectangle. Just don't make it white if your movie background is white too :)
Now, one important thing! In the registration portion of the Convert to Symbol window, click the middle left rectangle (see it on the image below). This will be the movie clip's registration point. You may click OK now.

Why is this necessary, you may wonder? Well, the loading bar shows how much of your Flash website remains to be loaded. And it makes sense that it stretches from left to right, right?
You may eventually choose to make your loading bar stretch to both sides, or from right to left, but I will stick with the standard left-to right in this lesson.
To see what difference makes the selection of left and central registration points for a movie clip, just look at the flash example below.
4. Fine. With your newly made movie clip still selected on stage, go to the left side of the Properties panel below the scene and assign it an Instance name. Call it loadingBar.

5. Lock this layer. Make a new one and call it bytes info.

6. Select the Text tool (T). Go to the Properties panel once again, and select the following properties for your text field:

7. Click and drag out a text field just below the loading bar.
![]()
Hit Esc to exit text editing mode.
8. Set the position coordinates of your text field to round numbers (see 6 in the big image above). This will make the text in the field render properly, you will avoid any blurry characters.
9. Give this field an Instance name, otherwise you won't be able to tell it what to display via ActionScript commands. Call it bytesDisplay.

Lock this layer.
10. Make a new layer and call it arrow indicator.

11. Draw a nice small triangle just above the loading bar's left edge. NOTE: Once you locked its layer, the dynamic text field isn't visible. But don't worry - it is still there :)
![]()
If you don't know how to create a precise little triangle like the one in the image above, I'll show you quickly how to do it here:
The following figure displays the sequence of these steps:
![]()
To make life easier, draw a big square and once you have obtained the triangle, just make it smaller either with the aid of the Free Transform tool (Q) or by entering its dimensions manually in the Properties panel.
Also, be sure that the triangle is positioned on round coordinates (like you did with the text field previously) so that it renders sharply. After you did that, move it to its final position with the aid of the arrow keys on your keyboard. By doing that, you can move the triangle around and it will stay on round coordinates - the arrow keys move your objects exactly by 1 pixel at a time.
12. With the triangle still selected, press F8 (or select Modify > Convert to Symbol) to convert it to a movie clip.
Call it moving percentage field and make sure that the registration point is on its left middle side.

13. Double-click on the newly made movie clip on stage to enter inside it. You know that you are inside the movie clip now (working on its timeline and not the main scene) if you look above the layers.
![]()
14. Call this layer (inside the movie clip, yes) arrow.
15. Select the triangle drawing and move it so that its bottom point is centrally aligned below the movie clip's registration point.
The line seen in the image below is the loading bar on the main scene, which is seen as faded because you entered inside the movie clip - everything on the main scene is a little bit faded, to make the distinction between these objects and the ones inside the movie clip, so don't let that confuse you.

Why you must make this so? Because the percentage text field and the arrow will move as the loading bar progresses. To be able to have the arrow always placed at the loading bar's right edge, you are making these adjustements now.
16. Lock this layer. Make a new layer above it and call it text field.

17. Select the Text tool (T), click and drag to create a small text field just above the triangle.
![]()
18. Leave all the properties for the dynamic text field the same as they were for the first one you created. Just make a small adjustement: set the alignment for the text field to left.
![]()
The left aligned text will stretch to right as the movie loads and the information changes (for example 3%, 15% and 100%), instead of stretching to both sides if it were centrally aligned. This wouldn't look so good while the movie clip is moving parallelly with the loading bar, hence this change.
19. Give this text field an Instance name: call it percentDisplay.

20. Lock this layer. Click on the Scene 1 link above the layers to return to the main scene.
![]()
21. Use the arrow keys to adjust the position of the moving percentage field movie clip. Place it so that the blue triangle points at the loading bar's left edge.
![]()
22. Finally, give this movie clip an Instance name: call it percentClip.
Lock this layer.
23. Make a new layers on top of all the existing ones and call it content.

24. Right-click on this layer's frame 5 and select Insert Keyframe from the menu.

This keyframe will hold the site's content for this lesson. In a project for a real website, you can have as many layers as you want. Just make sure that every layer that is hosting content is empty until its frame 5. Don't place any site content on the first keyframe, because this particular frame is resereved for the preloader elements only.
If any of the layers' first frames hosted any content, you would get a bad flash site at the end. Because the user would wait for this content to load, together with the preloader elements. Right now, the first keyframe is only 1 KB in size, which is excellent, because this means it will load instantly, even on a slow modem connection!
The preloader must load at once, otherwise you risk losing your site (or worse, your client's) visitors.
25. You should place some content here now. The best thing to simulate content is an image. Find an image that is about 100-150 KBs in filesize. If you don't have one handy now, download the image I made for this tutorial.
Unpack the image (it is zipped). Put it somewhere you'll find it quickly.
26. Select File > Import > Import to Stage. Select the picture you want to import and click Open. The picture will appear on your main scene.
Fine. This image will make for some dummy content to simulate the download later. Go to the next page to continue and add the ActionScript to make the preloader work.