Forum Topic: Animated Preloader - Not Working!

(190 views • 23 replies)

This topic is 1 page long.

<< < > >>
Mad as Hell

sickstick

Reply To Post Reply & Quote

Posted at: 11/27/08 12:39 PM

sickstick DARK LEVEL 21

Sign-Up: 02/09/06

Posts: 1,469

Probably a very basic answer, but it's all I need, all these tutorials explaining how to make an animated preloader, never work for me! I have an animated MC, 100 frames long, each frame representing 1 percent.

If anyone can tell me where to go now, in a series of steps, I would be very thankful!

Thanks!
SickStick! :D

The Pork and Beans Collab: Thread | Movie

BBS Signature

Sleeping

Alirocks0

Reply To Post Reply & Quote

Posted at: 11/27/08 12:43 PM

Alirocks0 NEUTRAL LEVEL 05

Sign-Up: 09/27/08

Posts: 88

Wow dont need to do angry well here is a preloader you can download from newgrounds.
http://www.newgrounds.com/flash/Newgroun dsPreloader.fla

There you go

You are reading me?!

BBS Signature

None

Alirocks0

Reply To Post Reply & Quote

Posted at: 11/27/08 12:44 PM

Alirocks0 NEUTRAL LEVEL 05

Sign-Up: 09/27/08

Posts: 88

At 11/27/08 12:43 PM, Alirocks0 wrote: Wow dont need to do angry well here is a preloader you can download from newgrounds.
http://www.newgrounds.com/flash/Newgroun dsPreloader.fla

There you go

This link was wrong: http://www.newgrounds.com/flash/Newgroun dsPreloader.fla
This one is good http://www.newgrounds.com/flash/Newgroun dsPreloader.fla

You are reading me?!

BBS Signature

None

muffinman9

Reply To Post Reply & Quote

Posted at: 11/27/08 12:51 PM

muffinman9 LIGHT LEVEL 18

Sign-Up: 02/27/07

Posts: 1,244

I think he wants to make his own preloader, if you need help THIS may help you

www.kidzrkool.co.nr check out my site!

BBS Signature

None

ChillyCheese

Reply To Post Reply & Quote

Posted at: 11/27/08 01:08 PM

ChillyCheese FAB LEVEL 11

Sign-Up: 06/02/06

Posts: 1,662

At 11/27/08 12:51 PM, muffinman9 wrote: I think he wants to make his own preloader, if you need help THIS may help you

I'm having the same problem, and that tutorial isnt helping...


None

sickstick

Reply To Post Reply & Quote

Posted at: 11/27/08 01:23 PM

sickstick DARK LEVEL 21

Sign-Up: 02/09/06

Posts: 1,469

At 11/27/08 01:08 PM, ChillyCheese wrote: I'm having the same problem, and that tutorial isnt helping...

SNAP! That tut is poorly explained.

The Pork and Beans Collab: Thread | Movie

BBS Signature

None

muffinman9

Reply To Post Reply & Quote

Posted at: 11/27/08 01:53 PM

muffinman9 LIGHT LEVEL 18

Sign-Up: 02/27/07

Posts: 1,244

At 11/27/08 01:23 PM, sickstick wrote:
At 11/27/08 01:08 PM, ChillyCheese wrote: I'm having the same problem, and that tutorial isnt helping...
SNAP! That tut is poorly explained.

hmmm, I only chose that tutorial because it was once on the front page but I've never actually made anything from it. I can't seem to find any other tutorials on newgrounds via the search option, but look on flashkit or search google

www.kidzrkool.co.nr check out my site!

BBS Signature

None

korded

Reply To Post Reply & Quote

Posted at: 11/27/08 02:09 PM

korded EVIL LEVEL 06

Sign-Up: 02/06/00

Posts: 1,094

There's some code below, if you add it to the first frame of your animated preloader movieclip, I think it should work, haven't tested it though. Added a couple comments in there for understanding. If it doesn't work, maybe try placing the code on the animated preloader mc's parent timeline and targeting the mc with the gotoAndStop action.

bytes_total = Math.round(_root.getBytesTotal());

onEnterFrame = function() {
	bytes_loaded = Math.round(_root.getBytesLoaded());
	percent_loaded = bytes_loaded/bytes_total; 
	gotoAndStop(Math.round(percent_loaded*100)); // this should send your mc to the correct frame
       if (bytes_loaded == bytes_total) {
		_root.play(); // or whatever you want to happen once the movie is loaded
	}
}

stop();

None

korded

Reply To Post Reply & Quote

Posted at: 11/27/08 02:12 PM

korded EVIL LEVEL 06

Sign-Up: 02/06/00

Posts: 1,094

Ah.. worth mentioning, the basic idea is the preloader creates a percentage number (from 1 to 100), adds it into a variable, and then constantly tells the animated movieclip to go to whatever frame number the variable is currently holding.


None

sickstick

Reply To Post Reply & Quote

Posted at: 11/27/08 02:36 PM

sickstick DARK LEVEL 21

Sign-Up: 02/09/06

Posts: 1,469

Thanks, it works better than earlier, but it only gets about half way through the animation.

The Pork and Beans Collab: Thread | Movie

BBS Signature

None

korded

Reply To Post Reply & Quote

Posted at: 11/27/08 02:39 PM

korded EVIL LEVEL 06

Sign-Up: 02/06/00

Posts: 1,094

Hm, and then what happens, the movie plays? Did you try placing the code on the parent timeline instead?

If you're willing to send the .fla, I'd take a look at it.


None

mechanixnut

Reply To Post Reply & Quote

Posted at: 11/27/08 02:43 PM

mechanixnut LIGHT LEVEL 17

Sign-Up: 04/01/06

Posts: 2,297

If you post the .fla someone would be able to fix it.

[As Main][The Zelda Collab]
I suffer from CRS (Can't Remember Shit)

BBS Signature

None

sickstick

Reply To Post Reply & Quote

Posted at: 11/27/08 02:45 PM

sickstick DARK LEVEL 21

Sign-Up: 02/09/06

Posts: 1,469

Stuck it on the main timeline, still only reaches halfway.

The Pork and Beans Collab: Thread | Movie

BBS Signature

None

korded

Reply To Post Reply & Quote

Posted at: 11/27/08 02:51 PM

korded EVIL LEVEL 06

Sign-Up: 02/06/00

Posts: 1,094

Yea, see if you can post the .fla or email it, just the chunk with the preloader, probably easiest to just take a look. Or maybe someone else will post a different method.


Elated

sickstick

Reply To Post Reply & Quote

Posted at: 11/27/08 02:56 PM

sickstick DARK LEVEL 21

Sign-Up: 02/09/06

Posts: 1,469

Download!

(Flash 8)

The Pork and Beans Collab: Thread | Movie

BBS Signature

None

ChillyCheese

Reply To Post Reply & Quote

Posted at: 11/27/08 02:56 PM

ChillyCheese FAB LEVEL 11

Sign-Up: 06/02/06

Posts: 1,662

Could someone tell me what is wrong with this mess of code that I dont understand?


None

korded

Reply To Post Reply & Quote

Posted at: 11/27/08 03:05 PM

korded EVIL LEVEL 06

Sign-Up: 02/06/00

Posts: 1,094

Maybe I'm misunderstanding, but isn't the problem inside the preloader mc? Looks like your mask is only tweening up to the halfway point.. I moved it up farther at the end of the tween so it reveals the entire graphic behind it, seems to work fine I think.

At 11/27/08 02:56 PM, sickstick wrote: Download!

(Flash 8)

None

korded

Reply To Post Reply & Quote

Posted at: 11/27/08 03:11 PM

korded EVIL LEVEL 06

Sign-Up: 02/06/00

Posts: 1,094

At 11/27/08 02:56 PM, ChillyCheese wrote: Could someone tell me what is wrong with this mess of code that I dont understand?

Well, you have two chunks of preloader code in there, one on the main timeline and one inside the loading bar mc. I think both should work, but pick one or the other. What's the problem anyway?


None

sickstick

Reply To Post Reply & Quote

Posted at: 11/27/08 03:12 PM

sickstick DARK LEVEL 21

Sign-Up: 02/09/06

Posts: 1,469

Nope. Isn't the animation thats not working...

The Pork and Beans Collab: Thread | Movie

BBS Signature

None

ChillyCheese

Reply To Post Reply & Quote

Posted at: 11/27/08 03:23 PM

ChillyCheese FAB LEVEL 11

Sign-Up: 06/02/06

Posts: 1,662

At 11/27/08 03:11 PM, korded wrote:
At 11/27/08 02:56 PM, ChillyCheese wrote: Could someone tell me what is wrong with this mess of code that I dont understand?
Well, you have two chunks of preloader code in there, one on the main timeline and one inside the loading bar mc. I think both should work, but pick one or the other. What's the problem anyway?

Okay so I removed the one on the main timeline and its still not working....But this is all I'm getting


None

korded

Reply To Post Reply & Quote

Posted at: 11/27/08 03:28 PM

korded EVIL LEVEL 06

Sign-Up: 02/06/00

Posts: 1,094

At 11/27/08 03:12 PM, sickstick wrote: Nope. Isn't the animation thats not working...

Didn't notice this, you have the actions placed on the actual movieclip. Try going into your preloader mc, make a new layer, and on the first frame add this code:

bytes_total = Math.round(_root.getBytesTotal());

onEnterFrame = function() {
	bytes_loaded = Math.round(_root.getBytesLoaded());
	percent_loaded = bytes_loaded/bytes_total; 
	gotoAndStop(Math.round(percent_loaded*100)); // this should send your mc to the correct frame
    if (bytes_loaded == bytes_total) {
		_root.play(); // or whatever you want to happen once the movie is loaded
	}
}

stop();

Same as before. Make sure the mask is tweened fully up, and try it out. The first frame of your main timeline should also have a stop action on it if it doesn't already.


None

korded

Reply To Post Reply & Quote

Posted at: 11/27/08 03:39 PM

korded EVIL LEVEL 06

Sign-Up: 02/06/00

Posts: 1,094


None

sickstick

Reply To Post Reply & Quote

Posted at: 11/28/08 11:10 AM

sickstick DARK LEVEL 21

Sign-Up: 02/09/06

Posts: 1,469

Can you just send me the .FLA! It isn't working! Grrrrr!

The Pork and Beans Collab: Thread | Movie

BBS Signature

None

chunkycheese12

Reply To Post Reply & Quote

Posted at: 11/28/08 02:33 PM

chunkycheese12 LIGHT LEVEL 15

Sign-Up: 11/05/07

Posts: 1,265

Go on msn, i'll help you. Well you might be on, i dunno lol. Let me check...

I LIEK EESTAH - Easter Collab '09

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 03:10 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!