Here's an easy one!

I have designed a nice (but basic) web site entirely in flash using simple buttons and some basic techniques. Now, I have two questions.

First: I have seen complicated instructions on adding what I think is called a preloader, the bar that fills up as the movie loads. In very simple terms, how do I make one of these? (As part of this, is there an easy way to add empty frames at the beginning of a movie?)

Second: Once the entire thing is done, how do I take the HTML or flash and put it online? Is there a good site that provides free hosting and can take HTML? How do I upload it and make it actually be visible on the www?

There is an excellent tute on the preloader here, look to the top and see tutorials. As far as publishing, goto; File, Publish settings, set them as you desire and publish. Take your, now 3 files, and load 2 of them onto your server; The SWF and the HTML. Rename your HTML ‘index.html’ and it will be viewed.


Well, thanks very much, quick, concise, and very helpful, I’ll go to it.

I think I was wrong about that tute. I don’t think kiupas got that one up yet. I think I got mine from Really nice and easy to phollow, matter of phact Im sure I got mine there. Only takes about a half hour or so to go through and make werk. But the other stuff is simple, i think you’ll see how simple. And there is no need to upload your FLA file. It is only for editing and creating the SWF.


Hey Phil,
It took you 300 posts to get there, but now you’re the Flashguru of ! Another 1.2 KPosts and you’ll match Upuaut.

Ya, I’ll match him in verboseness only! Phlashguru. Ha. More like a phlashGargoyle. Ok, I have these problems. How do you ADD those functions to the button. not clear to me. And how do I make the Text field Hidden UNTIL the button is rolled over?


If you are still there, I got the site running, but I am having trouble with the preloader. I found the tutorial, but it uses tons of terms that I am not familiar with. Is there a place that goes very simply step by step or perhaps you could take me through it in a posting?

Goto; modify; Create new scene. Name new scene Preload, preloader, whichever you prefer. Name the Main scene ‘Main’ or what you prefer, just remember the name of what you call the Main, as you will have to use it in the actions box.
These are the first basic scripts on that page at You can phind the ifframeloaded in the actions box. Make it look like above. Make sure you are on the same tute as me, the percentage preloader tute. Do this and write back.


Ok, I have a new scene with two keyframes and the matching scripts for each frame.

Credits to; Jesse Stratford/

We start off as before: insert a new Scene and use the Object Inspector to move this scene to the front of your movie (making it the first Scene). We want this scene to have 2 layers, so click the add layer button and name your two layers (from the top down) “Script” and “Visual”. Insert a keyframe in Script at frame 1, and another at frame 2 (select the frame and press F6). Extend Visual to be 2 frames long also (click in frame 2 and press F5).

Create a new movieClip symbol (Ctrl F:cool: and name is “bar”. Make this symbol 100 frames long (for ease) and insert 2 layers: Frame and Bar. In frame 1 of Bar, draw your loading bar using the square tool: mine’s a little gray box with a white outline. Now, select the outline (if you made one) and Cut it (Ctrl X). Select the Frame layer and Paste In Place (press Ctrl Shift V): this way your frame is on another layer and wont be tweened. Go back to the Bar layer and insert a keyframe at frame 100. Now at frame 1, zoom right in on your bar and use the select tool to cut off as much as you can while still keeping a little line there for the shape tween we’re about to make. You should now have a tiny line in frame 1 and the full bar in frame 100. Open up the Frame Inspector and set Tween to Shape tween. Now when you press Enter you should see your bar slowly filling up. Put a stop instance in frame 1 of the Frame layer so that this bar doesn’t just fill as soon as the movie starts. Now go back to your main stage and drag one copy of your bar movie clip symbol onto the stage at Frame 1 of the Visual layer. Use the instance inspector to name this symbol “bar”.

Now insert 4 Dynamic Text Fields in frame 1 of the Visual layer, (using the text tool and text inspector to set Type to Dynamic Text). Uncheck ‘Selectable’. name your fields as follows: total_bytes, loaded_bytes, remaining_bytes, percent_done .

Now we just need to ad the script and you’re ready! In the script below, you will have to adjust the ifFrameLoaded and gotoAndPlay actions to encompass the length and Scene names of your own SWF movie.

tell me what terms you don’t understand and I or someone else will walk you through it.


So far two problems.
First, how do I use the object inspector to move the scene to the front?

Second, how do I put in a stop instance in frame 1 of the frame layer?

In the onject inspectors box, simply drag the scenes to place them where you want them. Drag up, drag down, they will rearrange when you do that. the stop instance on frame 1; Goto frame 1, highlight the frame, goto; actions box; Click or drag stop to the right side.


Where is the object inspectors box?

Goto; Modify (see above at the top?) Scene. this will pop that sucker open for you.


As expected, I’m having trouble with the last scripts.

Credits; Jesse Stratford/

What problems specifically. Work with me here, I can’t read minds.

Frame 1

total_bytes = _root.getBytesTotal();loaded_bytes = _root.getBytesLoaded();remaining_bytes = total_bytes-loaded_bytes;percent_done = int((loaded_bytes/total_bytes)*100);bar.gotoAndStop(percent_done);ifFrameLoaded (“Scene 2”, 30) {&nbsp &nbsp &nbsp &nbsp gotoAndPlay (“Scene 2”, 1);}
Scrip analysis (What it does, by line)

General information below about actions above

Sets variable total_bytes to the byte size of this SWF movie.
Sets variable loaded_bytes to the current load status of this SWF movie.
Sets variable remaining_bytes to the number of bytes yet to load (using simple math) in this SWF movie.
Sets variable percent_done to the appropriate (rounded) number determined using simple math.
Tells the ‘bar’ clip to go to the frame number which corresponds to the current percentage loaded.
Checks loaded status - “Is movie fully buffed?”
If Line 6 returns True, goes to appropriate frame (start of movie).

Frame 2

gotoAndPlay (1);


In that code, I can do the “if frame loaded, go to” but I don’t see how to enter the things about total bytes, loaded, remaining, and percentage.

Simple solution; Copy and paste this script below;
Except modify it according to what you have named these scenes first. Mine is Main as you can see below. thats my main scene. Put in your main scene, the scene that is invisible until this preloader is done in the 2 spots below. (See Main)

loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
ifFrameLoaded (“Main”, 16) {
gotoAndPlay (“Main”, 1);

And on frame 2, put this action; highlight the frame, frame 2, then goto actions panel; goto and stop 1.

edited; Also remember to make the frames in ifframeloaded correspond to your movie, in mine it is frame 16 which is the last frame. Yours will be different I am sure, and you might have to modfiy the other goto and play but I doubt it, only you would know.

I have to run to the store and do a few things. I’ll check back later to see if you got it. If you have problems, just let yor forehead cool off, relax and go through the tutoial until you get what you need. you should be just about there. Cya in a little while, let me know how this all werked.

Also, I edited my above entry as in haste I forgot a simple step. See bottom of post above.


Just so you know… there are two different modes for writing script. Easy mode is the default which will prevent you from doing everything, but gives a lot of help. Phil is in expert mode, which lets him have more freedom, but less help.

That’s why it seems like you can’t type that in.