AS3-Quickfiles: Preloader Bar

Started by: uPnP | Replies: 3 | Views: 1,999

uPnP
2

Posts: 20
Joined: May 2012
Rep: 10

View Profile
May 8, 2012 2:48 AM #651553
This is just a simple preloader bar you guys can study with
I respect the official preloaders, but this would be more appropriate for the ones who
need to study it in a simple manner.

You guys can just toggle with the scripts or add parts in it.
By using this, I assume that you guys have an idea as to how a preloader BAR
works. Have fun.
Oh, and i hold this file and it is my own creation

As of the moment, I AM AT WORK.
I will be uploading it. In the mean time, i will be sharing you my brief AS3 code.


stop();
loader.addEventListener(Event.ENTER_FRAME, loading);
function loading(e:Event):void {
var total:Number =loaderInfo.bytesTotal;
var loaded:Number =loaderInfo.bytesLoaded;

loader.scaleX = loaded/total;
play();

}
Herom

Posts: 22
Joined: Jun 2012
Rep: 10

View Profile
Jun 15, 2012 12:27 PM #677441
k it's pretty convenient that i was trying to learn preloaders and now i'll have an example lol. thanks
Darko

Posts: 48
Joined: Aug 2012
Rep: 10

View Profile
Aug 15, 2012 8:58 PM #718686
damn, i get this error message. :confused:

Scene 1, Layer 'Layer 6', Frame 1, Line 7	1120: Access of undefined property loader.
Scene 1, Layer 'Layer 6', Frame 1, Line 2 1120: Access of undefined property loader.


Anyone know what the problem is? >.>
sotech

Posts: 908
Joined: Oct 2012
Rep: 10

View Profile
Feb 21, 2013 4:49 PM #891479
u need to create a rectangle and convert it to a movieclip,then give it the intense name loader