Tiny problem wit Preloader!

Hey guys, i did this tutorial straight out of a book, so i don’t know why it’s not working.

I have this Preloader movie clip on one scene called “preloader” then i have content on the second scene called “main”.

The preloader works fine, its just that once it is loaded somehow it doesnt go to the “main” scene.

Im sure the AS is right, its straight from a book, unless im doing some simple mistake!!

This is the AS on the preloader MClip ::

onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
framesLoaded = Math.ceil((loaded/total)*100);
gotoAndStop(framesLoaded);
status.text = framesLoaded+" % completed";
if (framesLoaded>=90) {
_root.gotoAndPlay(“main”, 1);
}
}

Sounds right ?? :-\

Ill attached the fla

Thanks :slight_smile:

Wow dave, that preloader takes too much work man…lol.

Try this one…

http://www.kirupa.com/developer/mx/percentagepreloader.asp

Really? I thought it was simple!!

But i still cant get it to go to the main scene.

The preloader works fine, it just doesnt go to the next scene :-\

Ill check out your tutorial, looks good :slight_smile:

Yeah, I couldn’t figure it out either, but frankly, I didn’t try much.

I am not in a coders state of mind today, and when I am like that, I am lucky to even be able to write a gotoAndPlay action…lol.

LOL, okay thanks anyway Lost!!

Must be sumpin im doing!! :*(

Well here is one way around it…

Add a stop action to frame one of scene “Main”

Now give frame one a label. I will call it “startMain” (no quotes).

Now go back to your preloader scene.

And change your goto line to look like this…

_root.gotoAndPlay("startMain");

You can do that OR put your preloader on Frame 1 of your main scene (with a stop() action on both), then use _root.gotoAndPlay(2).

That way you will have only one scene, and a working preloader…lol.

There I came up with 2 ways, now I am exhausted… goodnight man, and good luck!

K thanks ill give it a go!!

:slight_smile:

hey dude ,any reason why you want to use a seperate scene for a preloader and the main?

??

Anyway , from memory i remember when you use scenes you can let the first scene play through and it loads the next scene when it reaches the end of the animation.

Call me a spastic if i didnt understand you right , lol
(i’ll let you this time) :wink:

spastic!

:stuck_out_tongue:

i was wrong? it works though dosent it?

nah dont work!

Y did it work for you??

hope not!!

:!:

yeah

all i did ,

i got that component preloader, put a pic in the first scene to make the preloader work for a few seconds, inserted a new scene , but a shape on the new scene , and put a stop on the first frame.

you have to put a stop cause it will load the scenes back and forth, cause it basically acting like a extention of the timeline

nah dont use the component u spastic!

Use the one i have there to download!!

<:}

got yours working, u can use either go to frame 1 or change it to goto and play _root

SPASTIC!!! HAHAHAHAHA

■■■■ u did too!

Now whos the spastic!!..ME!

What did u change?

dnt worry ill have a look, actualy tell me, cldnt be bothored looking!!

=)

like i said before, if you play a scene until the end of its frame it will automatically go to the next scene, as scenes are like extentions of the main timeline, so all i did was change your go to , to play the first frame and then i put a stop on the next scene cause if you didnt it will go back to scene one (preloader) as it loops.

u get it dude?,

Yeah Whatever!!

Nah thanks man!!

Where u from sydney?

:stuck_out_tongue:

what, lol, i should of wrote sydney australia aye, lol