Creating loading % bar

Does anyone know how to create a percentage bar for use in showing the amount left to load?

Make a movie clip and design a rectangle the size you want your preloader bar to be, make sure you make it aligned right in your clip by using the align panel and give it an instance name of ‘loader_bar’ and place it on your _root timeline

Select frame 1 and place this code into your actions window:

kbytes_total = getBytesTotal() / 1024;
kbytes_loaded = getBytesLoaded() / 1024;
percent = Math.round((kbytes_loaded/kbytes_total)*100);
loader_bar._xscale = percent;
if(kbytes_loaded >= kbytes_total) {
	_root.gotoAndPlay(3);
}

Select frame 2 and press F6 to make a new keyframe and place this code in the actions window:

gotoAndPlay(1);

Now your main flash movie will start on frame 3 and its as simple as that a 2 frame preloader!

Dan…you might have to come on AIM and find me…this isnt working. It does nothing when I paste wut u wrote…