00:00
00:00
Newgrounds Background Image Theme

Itspanzinobro just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Animated Preloaders? (AS2)

531 Views | 2 Replies
New Topic

Animated Preloaders? (AS2) 2011-08-26 23:44:36


Hello, I am making an animated preload in AS2.

I have made 100 frames, and each frame does something different. I am no programmer, but I was wondering if there was a code to make it so that each percent that goes up, the animation would continue.

Please help me out, I'm trying to make the best preloader ever!


What's it gonna be? You have to decide.

Tits, or destiny...

...Tits...

Response to Animated Preloaders? (AS2) 2011-08-27 00:53:01


gotoAndStop(percent);

Next time, try the Flash Forum

Note:

Animated Preloaders? (AS2)


Hello, from the past!

[ PHP: Main ]

BBS Signature

Response to Animated Preloaders? (AS2) 2011-08-27 01:03:54


At 8/27/11 12:53 AM, Momo-the-Monkey wrote: gotoAndStop(percent);

Next time, try the Flash Forum

Note:

Sorry about that, misread it...

Anyway, the code you posted was the same as this one tutorial video's code that I used. I have no idea what's wrong with it but basically it stops at the first frame, and is stuck there until it is done loading. After it loads it goes straight from frame 1 to the play button.

Here is my code:

This code is on the main timeline, not inside the movieclip

stop();
onLoad = function() {
 total = _root.getBytesTotal()
 loaded = 0
}
loading_bar.onEnterFrame = function() {
 loaded = _root.getBytesLoaded()
 loading_bar.gotoAndStop(percent);
 percent = loaded/total*100
 
}

The movieclip which contains the animation is the instance of loading_bar.


What's it gonna be? You have to decide.

Tits, or destiny...

...Tits...