# Frozen preloader on external swf with sound in it

**URL:** https://forum.kirupa.com/t/frozen-preloader-on-external-swf-with-sound-in-it/155754
**Category:** Uncategorized
**Created:** [July 20, 2005, 3:00am UTC](https://forum.kirupa.com/t/frozen-preloader-on-external-swf-with-sound-in-it/155754 "2005-07-20T03:00:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![hoteurochick](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hoteurochick](https://forum.kirupa.com/u/hoteurochick)
#### Post date: [July 20, 2005, 3:00am UTC](https://forum.kirupa.com/t/frozen-preloader-on-external-swf-with-sound-in-it/155754/1 "2005-07-20T03:00:23Z")

</div>

I need some help, i believe here would be a good place to ask:

I prepared 3 swf files - each with sound in it- tested in browser they work “fine”, preloader shows up, then music began to play.

problem when i link them into a movie - that movie has a preloader itself, since includes attached sound(perhaps would be better replace attached with another swf playing onLoad), and that movie has 3 music buttons - on click 1,2,3 should downlad track 1, 2, or 3 (each on different swf file).

**Problem: after a click - preloader shows up - frozen, and uncomplete - and nothing plays.**

**main movie - each button (purple if sound button):**

[size=1][size=2]on (release)[/size][/size][size=1][size=2] {[/size]  
[/size][size=2][color=darkorchid]stopAllSounds();[/color]  
\_root.contents.[color=#000084]loadMovie/color;  
}

**main movie preloader (when main movie opens it works just fine):**

bytes\_loaded = Math.round(\_root.getBytesLoaded());  
bytes\_total = Math.round(\_root.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
\_root.loadBar.\_width = getPercent_100;  
\_root.loadText = Math.round(getPercent_100)+"%";  
if (bytes\_loaded == bytes\_total) {  
\_root.gotoAndStop(4);  
}

In that movie i have another empty movie with another group of buttons to load external text files. They have no preloaders and work fine.

**external movies:** [/size]  
[size=2]  
I tried to replace \_root with \_parent in external swfs ,  
where in main movie:

on (release) {  
stopAllSounds();  
container.loadMovie("[color=deepskyblue]sound\_2\_mov[/color].swf");

**and preloader in external:**

percentage = [color=#000084]Math[/color].[color=#000084]round/color + “[color=#0000ff] %[/color]”;[color=#000084]\_parent[/color].loadBar.[color=#000084]\_width[/color] = percentage\*100;[color=#000084]\_parent[/color].loadText = [color=#000084]Math[/color].[color=#000084]round/color+"[color=#0000ff]%[/color]";[color=#000084]if[/color] (bytes\_loaded == bytes\_total) { [color=#000084]\_parent[/color].[color=#000084]gotoAndStop/color;}

preloader does not work and sound does not play.  
(when i replace with “andPlay” it plays main movie).

How to fix it?  
Thanks[/size]
