# Problems with LoadMovie..!

**URL:** https://forum.kirupa.com/t/problems-with-loadmovie/19990
**Category:** flash
**Created:** [May 3, 2003, 7:12pm UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990 "2003-05-03T19:12:25Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![filete](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/filete/32/124_2.png) [@filete](https://forum.kirupa.com/u/filete)
#### Post date: [May 3, 2003, 7:12pm UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/1 "2003-05-03T19:12:25Z")

</div>

Hello there,

Im trying to load external .swf to my main movie.  
I have a button on the main movie with this code:

```auto

          on(release) {
	       _root.createEmptyMovieClip("container", 1);
	       loadMovie("http://www.filete.0catch.com/PreloaderDYNAMIC/MP3dynamic1.swf", "container");
	       container._x = 150 ;
	       container._y = 20 ;
      }
   

```

Well the external .swf has only a preloader that loads a mp3 that i have  
on the server.  
What is happening is after the button is pressed, the bar preloader appears  
full, but it is loading the mp3, but then there´s no sound.

```
Here´s the code i´ve made in the external .swf:

```

```auto

            stop();
intro = new Sound();
preloadNow = 1;
intro.loadSound("http://www.filete.0catch.com/intro.mp3");
this.onLoad = function() {
	introLoading = 0;
	_root.loadBar._xscale = introLoading;
};
this.onEnterFrame = function() {
	introBytesTotal = _root.intro.getBytesTotal();
	introBytesLoaded = _root.intro.getBytesLoaded();
	if (preloadNow == 1 && introBytesLoaded>0) {
		introLoading = Math.round((introBytesLoaded/introBytesTotal)*100);
		_root.percentLoadedText = introLoading+"%";
		_root.loadBar._xscale = introLoading;
		if (introLoading == 100) {
			preloadNow = 0;
			_root.gotoAndPlay(2);
		}
	}
};

```

If i play this external .swf by itself, everything works just fine (only try local),  
so anyone can help me with 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: [May 4, 2003, 4:47pm UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/2 "2003-05-04T16:47:03Z")

</div>

Anyone?

---

<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: [May 5, 2003, 5:11pm UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/3 "2003-05-05T17:11:33Z")

</div>

hello again,

I can´t believe that no one can help me.;(

---

<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: [May 5, 2003, 5:25pm UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/4 "2003-05-05T17:25:08Z")

</div>

try new Sound(this);

---

<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: [May 5, 2003, 5:48pm UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/5 "2003-05-05T17:48:38Z")

</div>

Nop:(

Didn´t work!

And what is more strange is that the preloader appears FULL! and  
i see on my cable activity , but then no sound.  
So i have this problem with the preloader, and then no .mp3 sound.

I´ve test the external .swf by itself on my local disk and everything was ok.  
Now since i´ve put it on my server…:q:

I was advise to put my preloader on every external .swf, but now  
with this problem , maybe is better to try using the preloader on the main  
movie!

Any help with this issues , will be very welcome!!

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: [May 5, 2003, 5:51pm UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/6 "2003-05-05T17:51:39Z")

</div>

well thats my quick answer to all sound problems without reading through fully. When I have time Ill take a closer look 😉

---

<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: [May 5, 2003, 8:42pm UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/7 "2003-05-05T20:42:38Z")

</div>

Hi lostinbeta,  
Can you help me with this issue?

---

<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: [May 6, 2003, 4:18am UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/8 "2003-05-06T04:18:14Z")

</div>

?

---

<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: [May 6, 2003, 4:35am UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/9 "2003-05-06T04:35:32Z")

</div>

obvoiusly you have an addressing issue there…

```auto
introBytesTotal = _root.intro.getBytesTotal();
introBytesLoaded = _root.intro.getBytesLoaded();

```

those lines are wrong, the sound object is not in the \_root but in the MovieClip. remove \_root.

and probably these lines are wrong too…

```auto
_root.percentLoadedText = introLoading+"%";
_root.loadBar._xscale = introLoading;

```

---

<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: [May 6, 2003, 4:38am UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/10 "2003-05-06T04:38:44Z")

</div>

If you are using loadMovie then the \_root is no longer the \_root. When you load the movie in, the \_root timeline is now the \_root of the main movie that you loaded into.

Therefore you can’t use \_root or it will only work as a seperate file.

Either remove the \_root or change it to “this” (like this.loadBar or this.percentLoadedText, etc, etc) and it should work.

PS: Please DO NOT PM me to look at your threads!!!

---

<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: [May 6, 2003, 4:39am UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/11 "2003-05-06T04:39:10Z")

</div>

Do you spy on me Kax???..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: [May 6, 2003, 4:40am UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/12 "2003-05-06T04:40:25Z")

</div>

you tell me… who replied first? :beam: 😛

**edit.**

> _Originally posted by lostinbeta_  
> **PS: Please DO NOT PM me to look at your threads!!!**

ditto :hair:

---

<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: [May 6, 2003, 4:41am UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/13 "2003-05-06T04:41:06Z")

</div>

filete:

Stop PM’img people to look at your threads!

I have warned you before!

one more chance…

Rev ![](http://www.aulman.com/rev.gif)

---

<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: [May 6, 2003, 4:42am UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/14 "2003-05-06T04:42:50Z")

</div>

I got PMed too :sleep:

---

<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: [May 6, 2003, 5:01am UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/15 "2003-05-06T05:01:55Z")

</div>

I´m sorry. :-\

I will stop sending PM , i just needed some help…

I’ve changed what you told me lostinbeta, but i keep getting the  
same problem.

preloader appears with the bar allready full , and after the .mp3 download  
there´s no sound.☹

Once again  
Im sorry

---

<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: [May 6, 2003, 5:10am UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/16 "2003-05-06T05:10:04Z")

</div>

try removing the onLoad handler.

```auto
introLoading = 0;
_root.loadBar._xscale = introLoading;

```

and the sound doesn’t start because you forgot to start it once it’s fully loaded…

```auto
if (introLoading == 100) {
intro.start();
preloadNow = 0;
_root.gotoAndPlay(2);
delete this.onEnterFrame;
}

```

---

<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: [May 6, 2003, 5:28am UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/17 "2003-05-06T05:28:15Z")

</div>

well, it seems that i will have to find another way,  
cos i still have the same problem , after i change the code like you told me…:-\

Thanks anyway kax

---

<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: [May 6, 2003, 5:38am UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/18 "2003-05-06T05:38:00Z")

</div>

that sucks… attach your files so i can take a look at 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: [May 6, 2003, 5:58am UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/19 "2003-05-06T05:58:37Z")

</div>

Well , i can´t attach the files, cos  
im using macintosh…

But if you want to see what is happening, make a flash movie where you  
put a button , and on that button put this code:

```auto

     on(release){
   loadmovie ("http://www.filete.0catch.com/PreloaderDYNAMIC/MP3dynamic.swf");
}

 

```

thanks for your patience:)

---

<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: [May 6, 2003, 6:09am UTC](https://forum.kirupa.com/t/problems-with-loadmovie/19990/20 "2003-05-06T06:09:12Z")

</div>

> _Originally posted by kax_  
> **and probably these lines are wrong too…**

```auto
_root.percentLoadedText = introLoading+"%";
_root.loadBar._xscale = introLoading;

```

remove **\_root** from all your script. that should fix it. 🙂

[Next page](https://forum.kirupa.com/t/problems-with-loadmovie/19990.md?page=2)
