# Trouble building an external SWF preloader

**URL:** https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197
**Category:** flash
**Created:** [July 29, 2004, 5:26am UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197 "2004-07-29T05:26:20Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![ccarlson](https://avatars.discourse-cdn.com/v4/letter/c/439d5e/32.png) [@ccarlson](https://forum.kirupa.com/u/ccarlson)
#### Post date: [July 29, 2004, 5:26am UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/1 "2004-07-29T05:26:20Z")

</div>

I am working on a project based on this pageflip source code that is located here: [http://www.iparigrafika.hu/pageflip/](http://www.iparigrafika.hu/pageflip/)  
My project is located at [http://www.carlsonphotography.com/galleries.htm](http://www.carlsonphotography.com/galleries.htm#) - once there you may click on “Jones Album” to see my utilization of the original source code from iparigrafika.hu.

As you can see on my version…there is no preloader…This is my problem.

I can’t add a standard preloader in the first few frames of the main movie, otherwise the flash no longer works properly. And every tutorial that i have found on loading external SWF files requires that a preloader be added to the external SWF.

**How do I write the actionscript for a percentage preloader of my external SWF without putting the preloader in the external SWF?**

Please keep in mind that I am a novice when it comes to actionscript, so bear with me. I would greatly appreciate any help that anyone can give me. I have been searching the net extensively and I cannot seem to find the answer…so I’m kind of desperate for some help.

Thank you,  
Chad

---

<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: [July 29, 2004, 5:33am UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/2 "2004-07-29T05:33:08Z")

</div>

use the F\*\*\*ING SEARCH TOOL TOOL

---

<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: [July 29, 2004, 5:34am UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/3 "2004-07-29T05:34:32Z")

</div>

excuse me??? What’s your problem?

---

<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: [July 29, 2004, 5:37am UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/4 "2004-07-29T05:37:06Z")

</div>

Instead of being an A\*\*hole way don’t you just post the link to the answer I’m looking for…Mr. Ratbaggy

---

<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: [July 29, 2004, 5:38am UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/5 "2004-07-29T05:38:56Z")

</div>

have a look at the results and you should be able to work out why

URL deleted  
Cause you’re lazy

---

<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: [July 29, 2004, 6:26am UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/6 "2004-07-29T06:26:06Z")

</div>

Your attitude is completly uncalled for…I went through all the tutorials here and did not find an answer to my question so I decided to seek help in the forum. Only to be greeted with a some A\*\* with a chip on his shoulder. Don’t you think that it would have been just as easy just say “Try doing a search here at Kirupa for ------ and you should find your answer” Instead of “use the F\*\*\*ING SEARCH TOOL TOOL”? Or even better, since you seem to know it all, you could have posted the exact link to the tutorial that I need. Since you didn’t, I’m assuming your the one who is too lazy.

More likely your jsut one of those that just “gets off” by pissing people off.

Thanks for nothing

---

<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: [July 29, 2004, 6:29am UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/7 "2004-07-29T06:29:06Z")

</div>

not at all.

here you go,

Try doing a search here at Kirupaforum for preloader external  
I’m sure you will be ever so surprised by the results which are returned.

essentially says the same thing as before, right?

---

<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: [July 29, 2004, 2:14pm UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/8 "2004-07-29T14:14:08Z")

</div>

just load the external swf in a mc in the preloader.

---

<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: [July 30, 2004, 12:47am UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/9 "2004-07-30T00:47:36Z")

</div>

Yes I do know that I do need to load it into and empty movie clip in my main movie…but the actual code writing to make that happen is what’s causing me troubles. I know this question has been probably asked a hundred times but I’ve searched through the forums and can’t seem to find the answer. Here is the preloader script that I need to point to my external SWF. Currently it is coded to work so that I can drop it into the first frame of a movie to preload it. (I’m assuming that’s what the “parent” means) but I need to make it load and get the bytes loaded information from my external SWF. I have also attached the .fla file if for some reason it helps.  
Do I just change the _\_parent._ with _\_myexternal.swf.getBytesTotal…?_

[color=Blue]onClipEvent (load) {  
if (\_parent.getBytesTotal() == \_parent.getBytesLoaded()) {  
quickPlay = true;  
} else {  
preLoad = (\_parent.getBytesTotal()\*0.75);  
// percent to preload  
}  
\_parent.stop();  
}  
onClipEvent (enterFrame) {  
gotoAndStop(loadedIndicatorFrame());  
if (quickPlay == true) {  
// quickly play the anim  
if (\_currentframe == \_totalframes) {  
\_parent.play();  
}  
} else {  
// wait for the preload  
if (\_parent.getBytesLoaded()\>=preLoad) {  
\_parent.play();  
}  
}  
}

[color=Black]Thanks for the help.  
Chad[/color]  
[/color]

---

<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: [July 30, 2004, 1:00am UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/10 "2004-07-30T01:00:04Z")

</div>

alright I give up…😛

[http://www.kirupaforum.com/forums/showthread.php?t=64227](http://www.kirupaforum.com/forums/showthread.php?t=64227)

---

<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: [July 30, 2004, 1:11am UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/11 "2004-07-30T01:11:17Z")

</div>

Yea I did read that forum thread but it looked like the loader was in the first frame of the external swf, Is it? I can’t open that fla…I get “unexpected file format” is it a Flash Mx 2004 or Flash MX? Ratbaggy…if you think it answers my question could you supply me with a Flash MX file that I can open and check out.

Thanks,  
Chad

---

<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: [July 30, 2004, 1:46am UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/12 "2004-07-30T01:46:00Z")

</div>

ah…the things I do…

---

<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: [July 30, 2004, 3:33am UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/13 "2004-07-30T03:33:06Z")

</div>

Thanks rat…I’m getting closer…now the only thing I have to figure out is why it stalls during the load and the loader disappears. When I go back in the browser and click the link again it continues the load where it left off and then loads fine. Any ideas? I’ve uploaded a rudimentary example of what I’m trying to do here…  
[www.carlsonphotograpy.com/test.html](http://www.carlsonphotograpy.com/test.html)

Most of the code makes sense to me all except the “dummy == 1” code…what is that actually doing? (yes, yes I know “I’m the dummy here” but you know what I’m asking:puzzle:

Thanks again for taking the time to convert and send me the file I do appreciate the help.

Chad

---

<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: [July 30, 2004, 10:22pm UTC](https://forum.kirupa.com/t/trouble-building-an-external-swf-preloader/59197/14 "2004-07-30T22:22:22Z")

</div>

Anyone???I’ve been trying to figure out why it stalls and on refresh it starts again where it left off. In addition after it loads it screws up my swf so when you turn the pages the pictures don’t transition smoothly. And now I’ve found that after a minute or so the loaded Swf dissappears.  
I know everyone is tired of pre loader questions…but I promise you this is not your ordinary pre loader problem. I have tried multiple tutorials and pre loader templates to no avail.  
[www.carlsonphotography.com/test.html](http://www.carlsonphotography.com/test.html) Sorry the above link was wrong.

thanks  
Chad
