Be a Supporter!

Animated Preloaders? (AS2)

  • 290 Views
  • 3 Replies
New Topic
DahDoctow
DahDoctow
  • Member since: Mar. 11, 2010
  • Offline.
Forum Stats
Member
Level 11
Game Developer
Animated Preloaders? (AS2) Aug. 26th, 2011 @ 11:44 PM

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...

Momo-the-Monkey
Momo-the-Monkey
  • Member since: Oct. 15, 2005
  • Offline.
Forum Stats
Member
Level 45
Musician
Response to Animated Preloaders? (AS2) Aug. 27th, 2011 @ 12:53 AM

gotoAndStop(percent);

Next time, try the Flash Forum

Note:

Animated Preloaders? (AS2)


Hello, from the past!
[ PHP: Main ]

BBS Signature
DahDoctow
DahDoctow
  • Member since: Mar. 11, 2010
  • Offline.
Forum Stats
Member
Level 11
Game Developer
Response to Animated Preloaders? (AS2) Aug. 27th, 2011 @ 01:03 AM

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...

Zendra
Zendra
  • Member since: Sep. 7, 2003
  • Offline.
Forum Stats
Moderator
Level 51
Blank Slate
Response to Animated Preloaders? (AS2) Aug. 27th, 2011 @ 05:33 AM

At 8/27/11 01:03 AM, StompRocket2009 wrote:
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,

And still proceeding... *sigh*