Stick Figure Death Theatre
SFDT Forums
Google
HOME | MOVIES | HELP | FORUMS | NON-STICK | more...
 RegisterRegister  Home  SearchSearch  Sound BoardSound Board   Log inLog in 

Posted by
BioJoe


Joined: 25 Aug 2005
View user's profile Send e-mail


A Bar Preloader
Posted: Sat Sep 09, 2006 11:02 am
Want to rate it? You must be logged into The Vault.

How to make a bar preloader is kind of hard it took me about two days for me to get it really ready.

So here we go:
The Actions

Make a new layer called "actions"(No Quote Marks) and put in this on the first keyframe:

Code:
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
percentbytes = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.percentbytes);
}


And then put a second Keyframe in and put in this code:

Code:
if (loadedbytes == totalbytes) {
nextScene ();
}else{
gotoAndPlay (1);
}


Then it should look like this:



Now onto the next step
Making The Bar

Make a new Layer called "loader" (No Quote Marks)
This Layer will hold the loader bar.

While in the loader Layer press CTRL+F8. Then make its behavior a "Movie Clip" and its name loader then click OK.

Now... when you are in the Movie Clip and two more layers and in the top layer make a Rectangle with no fill. And then in the next layer down make another rectangle with fill but no line and also line it up perfectly with the other rectangle with no fill. Then on the last frame also make a Rectangle with only fill and no line but put this to the left side.
Then in every layer go up to the 100th frame and Insert Frame.

Then go to the second frame and Hide+Lock it.
Now go to the 100th frame of the bottom layer and insert KeyFrame and on the keyframe drag the rectangle in the outline of the other rectangle.
Then Create Motion Tween.

Now right click on the second Layer and click Mask and unhide Layer 1 and 2.

Now go back onto the main stage and press F11 to open your library and drag the loader MC onto the stage in the first frame if the loader Layer. Then select the MC and go to the properties panel and change the instance name to "loader" (No Quote Marks)

CONGRATULATIONS you made a loader bar

Now onto the next step
The Percentages

Percentage

Select the text tool and type a 0 in it. Select the 0 and go to the properties panel, And change it to Dynamic text. And give it the bar name "percentbytes" (No Quote Marks) Then add a static text box with a % in it beside the 0.

Now Bytes Loaded

Select the text tool and make a text box with a 0 in it. Then select the box and got to its properties panel. Change it to dynamic text and its var name "percentbytes" (No Quote Marks) Then add a static text box with Percent Bytes in it.

Last - Total Bytes

Select the text tool and make a text box with a 0 in it. Then select the box and got to its properties panel. Change it to dynamic text and its var name "totalbytes" (No Quote Marks) hen add a static text box with Total Bytes in it.

Congratulation A Working Bar Loader

View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
   The Vault Index -> Coding All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to tutorials in this forum
You cannot edit your tutorials in this forum
You cannot delete your tutorials in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group