Tutorials Home
What's New
Top Rated
Submit
myTutes
Random!
Preloader with Dial Display
Author: Alan Wisternoff
| Website: http://www.buffoonbrothers.com |
Step Two: Initialise Variables
In the first frame on the timeline add these variables and values
a = getBytesLoaded();
b = getBytesTotal();
v = Math.floor(a/1024)+"kb";
z = Math.floor(b/1024)+"kb";
w = Math.ceil((a/b)*360);
The variables a and b are exactly what they say. The variables v and z are the variables a and b converted from bytes to kilobytes and converting to an integer. The value w is the proportion of bytesloaded to bytesTotal converted to an angle in degrees. This is the value we will use to move the needle through its travel.
Back on the timeline add a new frame, frame 2 and add this code
gotoAndPlay (1);
This simply loops the loading animation so it can constantly be updated with renewed "bytesloaded" information.
| » Level Intermediate |
|
|
Added: : 2003-05-19
Rating: 7.02 Votes: 27
Hits: 3235
|
| » Author |
|
Cyclist, Snowboarder, Flash Designer Extrordinaire.
|
| » Download |
|
Download the files used in this tutorial.
|
|
Download (52 kb)
|
|
Get conversion and unzipping tools
for PC and Mac here!
|
| » Forums |
|
More help? Search our boards for quick answers!
|
|
Please rate this tutorial, 10 is the top rating, you can also click the
comments link to read/write a review.
|
|
|