# Loaded movie pathing problem - quick one i promise

**URL:** <https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143>\
**Category:** Uncategorized\
**Created:** [July 28, 2004, 7:31pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143 "2004-07-28T19:31:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdzines](https://avatars.discourse-cdn.com/v4/letter/k/7ea924/32.png) [@kdzines](https://forum.kirupa.com/u/kdzines)\
**Post date:** [July 28, 2004, 7:31pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/1 "2004-07-28T19:31:51Z")

</div>

hi,

i have some code in my main movie which load in a couple of swfs.  
in mc2.swf there is an mc called button.

why does the code below not work (and make the button active)?

```auto

createEmptyMovieClip("mcPlaceholder1",0);
mcPlaceholder1._y = 0;
loadMovie("mc1.swf","mcPlaceholder1");

//createEmptyMovieClip("mcPlaceholder2",1);
mcPlaceholder2._y = 200;
loadMovie("mc2.swf","mcPlaceholder2");

this.mcPlaceholder2.button.onPress = function(){
	//_parent.mcPlaceholder1.stop();
}

```

if you know why, please let me know (the actual file i’m working on is massive with lots of functions on the main timeline that need to be referenced by the child swfs - so even though i’m sure the answer is simple, it’s really important)!

thank a million

kd

---

<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 28, 2004, 7:44pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/2 "2004-07-28T19:44:09Z")

</div>

This is probably not the answer per se but ‘button’ is one of those reserved words that you shouldn’t use as a name for anything. May or may not make a difference in this case but you might want to reconsider changing that.

Other than that - are you sure you want to use ‘this’ in the path?

:hr:

---

<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 28, 2004, 7:59pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/3 "2004-07-28T19:59:34Z")

</div>

oops the “this” should not be there, and i have tried with other instance names.

any other ideas?

---

<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 28, 2004, 8:29pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/4 "2004-07-28T20:29:25Z")

</div>

anybody?

Sorry to be pushy, i got a tight tdeadline (about 12 hours)!

---

<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 28, 2004, 8:54pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/5 "2004-07-28T20:54:42Z")

</div>

Try this:

createEmptyMovieClip(“mcPlaceholder1”,0);  
\_root.mcPlaceholder1.loadMovie(“mc1.swf”);

createEmptyMovieClip(“mcPlaceholder2”,1);  
mcPlaceholder2.\_y = 200;  
\_root.mcPlaceholder2.loadMovie(“mc2.swf”);

\_root.mcPlaceholder2.button.onPress = function(){  
\_root.mcPlaceholder1.stop();  
}

---

<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 28, 2004, 8:59pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/6 "2004-07-28T20:59:59Z")

</div>

hi,

nope doesn’t work. basically whatever i do, any code i have (on the main timeline) for instances inside the loaded swf do not work!

i tried \_root, this. etc - but nothing is working.

try it and see if you have the same problem.

thanks for the reply

kd

---

<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 28, 2004, 9:09pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/7 "2004-07-28T21:09:09Z")

</div>

Okay let’s backtrack a moment here. So you are creating the empty movie clips in the main movie right? And then you are loading external swfs in. Are they loading successfully? You can see them an everything? If there is animation on them then it should start as soon as it is done loading.

:hr:

---

<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 28, 2004, 9:16pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/8 "2004-07-28T21:16:48Z")

</div>

> [@lunatic](#):
>
> Okay let’s backtrack a moment here. So you are creating the empty movie clips in the main movie right? And then you are loading external swfs in. Are they loading successfully? You can see them an everything? If there is animation on them then it should start as soon as it is done loading.
> 
> :hr:

you need to make sure the move is loaded before you can do anything to it.  
Set up a loop to compare getBytesLoaded()/getBytesTotal().

---

<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 28, 2004, 9:16pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/9 "2004-07-28T21:16:53Z")

</div>

right

the swfs are loading fine (and playing automatically).

on swf2 i have an mc button.

on the stage i have the .onPress AS for the button that is in swf2.

The instance names are all correct, there are no typos.

what is going on!!!

* * *

in my real project i am loading in swfs (seriously big ones) and i want the loaded swfs to execute functions on the main timeline.

But i really don’t want to complicate this thread!!!

please help…

---

<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 28, 2004, 9:18pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/10 "2004-07-28T21:18:39Z")

</div>

hey Stringy,

if the child movie is playing, then it’s loaded - 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 28, 2004, 9:24pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/11 "2004-07-28T21:24:50Z")

</div>

> [@kdzines](#):
>
> hey Stringy,
> 
> if the child movie is playing, then it’s loaded - right?

yes it is but maybe it has passed your button code before it loads

---

<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 28, 2004, 9:28pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/12 "2004-07-28T21:28:15Z")

</div>

yeah but i tried putting the .onPress code a few frames further on as well.

---

<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 28, 2004, 9:32pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/13 "2004-07-28T21:32:06Z")

</div>

> [@kdzines](#):
>
> yeah but i tried putting the .onPress code a few frames further on as well.

if you want to upload the files,i`ll have a quick 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:** [July 28, 2004, 9:32pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/14 "2004-07-28T21:32:13Z")

</div>

Put a trace on the button see if it returns anything.

e.g.

```auto

_root.mcPlaceholder2.button.onRelease = function(){
trace("button has been pressed");
}

```

---

<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 28, 2004, 9:44pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/15 "2004-07-28T21:44:48Z")

</div>

here are the files.

lunatic - yeah i tried that but seeing as i can’t make the button active, not of much use!

see if you can see anything in the files.

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:** [July 28, 2004, 10:11pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/16 "2004-07-28T22:11:57Z")

</div>

Unexpected file format - are you in MX2004? Can you save as MX?

---

<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 28, 2004, 10:19pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/17 "2004-07-28T22:19:42Z")

</div>

[http://www.gifsrus.com/testfile/master.swf](http://www.gifsrus.com/testfile/master.swf)  
i put a stop action in the first frames of the movies you are loading and then a bytesloaded preloader type thing in master with a command to play() and the button action.

---

<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 28, 2004, 10:20pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/18 "2004-07-28T22:20:43Z")

</div>

hey

try this.

Just got Flash MX 2004, didn’t even think about 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:** [July 28, 2004, 10:22pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/19 "2004-07-28T22:22:20Z")

</div>

hey Stringy.

Could you upload the fla please?

That would be brill

cheers,

---

<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 28, 2004, 10:27pm UTC](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143/20 "2004-07-28T22:27:20Z")

</div>

you could also give your button in mc2 the actions  
on(release){  
\_root.mcPlaceholder1.stop();  
}  
that does work… but i guess you want to use the .onPress function?

[Next page](https://forum.kirupa.com/t/loaded-movie-pathing-problem-quick-one-i-promise/59143.md?page=2)
