# Tiny problem wit Preloader!

**URL:** https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165
**Category:** Uncategorized
**Created:** [December 26, 2002, 4:40am UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165 "2002-12-26T04:40:18Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Dave](https://forum.kirupa.com/u/Dave)
#### Post date: [December 26, 2002, 4:40am UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/1 "2002-12-26T04:40:18Z")

</div>

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 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 26, 2002, 5:10am UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/2 "2002-12-26T05:10:56Z")

</div>

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

Try this one…

[http://www.kirupa.com/developer/mx/percentagepreloader.asp](http://www.kirupa.com/developer/mx/percentagepreloader.asp)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 26, 2002, 7:42am UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/3 "2002-12-26T07:42:31Z")

</div>

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 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 26, 2002, 7:45am UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/4 "2002-12-26T07:45:12Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 26, 2002, 7:51am UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/5 "2002-12-26T07:51:38Z")

</div>

LOL, okay thanks anyway Lost!!

Must be sumpin im doing!! :\*(

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 26, 2002, 8:00am UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/6 "2002-12-26T08:00:34Z")

</div>

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…

```auto
_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!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 26, 2002, 8:16am UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/7 "2002-12-26T08:16:45Z")

</div>

K thanks ill give it a go!!

🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2002, 1:36pm UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/8 "2002-12-29T13:36:51Z")

</div>

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) 😉

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2002, 1:43pm UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/9 "2002-12-29T13:43:06Z")

</div>

spastic!

😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2002, 1:45pm UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/10 "2002-12-29T13:45:13Z")

</div>

i was wrong? it works though dosent it?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2002, 2:08pm UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/11 "2002-12-29T14:08:15Z")

</div>

nah dont work!

Y did it work for you??

hope not!!

:!:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2002, 2:11pm UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/12 "2002-12-29T14:11:07Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2002, 2:32pm UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/13 "2002-12-29T14:32:05Z")

</div>

nah dont use the component u spastic!

Use the one i have there to download!!

\<:}

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2002, 2:32pm UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/14 "2002-12-29T14:32:39Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2002, 2:34pm UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/15 "2002-12-29T14:34:29Z")

</div>

SPASTIC!!! HAHAHAHAHA

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2002, 2:38pm UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/16 "2002-12-29T14:38:03Z")

</div>

■■■■ 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!!

=)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2002, 2:41pm UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/17 "2002-12-29T14:41:28Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2002, 2:53pm UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/18 "2002-12-29T14:53:00Z")

</div>

u get it dude?,

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2002, 2:53pm UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/19 "2002-12-29T14:53:34Z")

</div>

Yeah Whatever!!

Nah thanks man!!

Where u from sydney?

😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2002, 2:59pm UTC](https://forum.kirupa.com/t/tiny-problem-wit-preloader/10165/20 "2002-12-29T14:59:42Z")

</div>

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