# MX - Preloader AS Problem

**URL:** https://forum.kirupa.com/t/mx-preloader-as-problem/27785
**Category:** flash
**Created:** [August 6, 2003, 4:29pm UTC](https://forum.kirupa.com/t/mx-preloader-as-problem/27785 "2003-08-06T16:29:57Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![grandsp5](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@grandsp5](https://forum.kirupa.com/u/grandsp5)
#### Post date: [August 6, 2003, 4:29pm UTC](https://forum.kirupa.com/t/mx-preloader-as-problem/27785/1 "2003-08-06T16:29:57Z")

</div>

I have a preloader in this file which is supposed to check whether the external swf has been loaded into the movie clip “placeholder” and if it is, goto and play frame 3 of the movie clip. It doesn’t work. How come? I know the preloader code works, it displays 100 percent and the load bar and text fields all display what they are supposed to but it doesnt go to frame 3. any help appreciated.

---

<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: [August 6, 2003, 4:39pm UTC](https://forum.kirupa.com/t/mx-preloader-as-problem/27785/2 "2003-08-06T16:39:21Z")

</div>

when you have a preloader for an swf loaded into a movie clip, if you use \_root.getBytesLoaded() etc… it’ll be referring to the root… try using this.blah blah and that worked for me. when loading swf’s into clips of movies like on this site I’m working on. I can send you the code if you’d like. [http://www.carolinaautoimport.com/new](http://www.carolinaautoimport.com/new)

---

<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: [August 6, 2003, 4:44pm UTC](https://forum.kirupa.com/t/mx-preloader-as-problem/27785/3 "2003-08-06T16:44:04Z")

</div>

I added a keyframe but it still doesnt work ☹ And I am using this instead of \_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: [August 6, 2003, 4:51pm UTC](https://forum.kirupa.com/t/mx-preloader-as-problem/27785/4 "2003-08-06T16:51:20Z")

</div>

You don’t have a keyframe at frame 3. That’s why the actions from frame 2 ( gotoAndPlay(1) ) will be executed when entering frame 3. But **there is no preloader code which tells flash to go to frame 3 when fully loaded** at frame 1, so it will just continue to frame 2. Which will then go to frame 1, which then plays 2, which then plays 1 again. So you are in an infinite loop.

You can see this by looking at the Ouput window. I don’t have the SWF which is supposed to load, and my Output window says:

Couldn’t find Home.swf  
Couldn’t find Home.swf  
Couldn’t find Home.swf  
Couldn’t find Home.swf  
…

That is because it keeps going to frame 1 which calls Home.swf.

---

<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: [August 6, 2003, 4:54pm UTC](https://forum.kirupa.com/t/mx-preloader-as-problem/27785/5 "2003-08-06T16:54:16Z")

</div>

oops. my bad i forgot to include it. here is home. and even though i added a keyframe at frame 3 it doesnt work. hmm. i think i know what the problem might be thanks to your wonderful explanation 🙂 If i keep the load call on frame one and move the preloader loop to frames 2 and 3, going to frame 4 when loaded, that should work right? The problem now is every time it loops back to frame 1 it tries to reload the file. Ill try that. 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: [August 6, 2003, 4:55pm UTC](https://forum.kirupa.com/t/mx-preloader-as-problem/27785/6 "2003-08-06T16:55:34Z")

</div>

bam it works. Thanks a lot Voetsjoeba 🙂

---

<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: [August 6, 2003, 4:58pm UTC](https://forum.kirupa.com/t/mx-preloader-as-problem/27785/7 "2003-08-06T16:58:21Z")

</div>

You’re welcome 🙂

---

<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: [August 6, 2003, 4:59pm UTC](https://forum.kirupa.com/t/mx-preloader-as-problem/27785/8 "2003-08-06T16:59:02Z")

</div>

I cant see why your preloader script is in a movie clip that your loading an external swf into. I really looks like your confused.

But anyway, if you want to go to frame 3 then in your ‘if’ condition in your preloader code in your placeholder movie clip just delete the ‘\_parent’ and you’ll see it goes to frame 3.

Regs,  
Viru.

---

<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: [August 6, 2003, 5:01pm UTC](https://forum.kirupa.com/t/mx-preloader-as-problem/27785/9 "2003-08-06T17:01:24Z")

</div>

I moved it to the movie clip to see if it worked there because it didnt work on the timeline. Im moving it back now which makes more sense. You are right it looks very convoluted. I am in the process of fixing it.
