Here is a Loading Bar I developed using the ratio of Loaded bytes to total bytes.
This script uses three main elements. The first one we will discuss is: “_xscale”
//This is used to specify the
//width of an symbol (ie. movieClip)
_root.movieClip._xscale = *number between 0 and 100*
To go into more detail into that last element, if your movie clip is named “loaderbar” and you made it to be at its full length (about 200 pixels lets say), you could type:
_root.loaderbar._xscale = 50;
//That would squeeze it to
//100 pixels (50%)
This is what we will be using to slowly move the bar across the screen as the file is loaded.
Here is a Flash Loading Bar to demonstrate the _xscale Property.
This is continued in ActionScript Loading Screen Part 2
This post was written by Ashton