# Load external movie headache!

**URL:** https://forum.kirupa.com/t/load-external-movie-headache/14102
**Category:** flash
**Created:** [February 21, 2003, 9:45pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102 "2003-02-21T21:45:00Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![cookie](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@cookie](https://forum.kirupa.com/u/cookie)
#### Post date: [February 21, 2003, 9:45pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/1 "2003-02-21T21:45:00Z")

</div>

I have created a flash movie which shows the time and when you rollover it, the date is displayed in a drop-down menu! Everything works just fine! However, I now want to load this time.swf into main.swf!

I used this script written by electrongeek:

```php
_root.containerMC.loadMovie("time.swf");

_root.containerMC._x=50;

_root.containerMC._y=50;

```

The problem is that it loads into main.swf, but it will no longer show the date in the drop-down! I get the following error:

```php
Target not found: Target="drop_dateClip" Base="_level0.containerMC"

```

Note that "drop\_dateClip is insider time.swf

What should 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: [February 22, 2003, 1:29pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/2 "2003-02-22T13:29:07Z")

</div>

??:sigh:

---

<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: [February 22, 2003, 6:15pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/3 "2003-02-22T18:15:18Z")

</div>

Ummm… does anything in your loaded moving contain \_root? If so try changing to \_parent or “this” (no quotes).

Can you provide the files?

---

<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: [February 22, 2003, 6:22pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/4 "2003-02-22T18:22:45Z")

</div>

hej …

Lost i have same problem …

i made swf with random moving circles (used suprabeener’s code)  
when i load it into main movie it plays choppy …

---

<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: [February 22, 2003, 6:26pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/5 "2003-02-22T18:26:46Z")

</div>

Same reply as previous.

---

<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: [February 22, 2003, 6:28pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/6 "2003-02-22T18:28:45Z")

</div>

when i change all \_root references in suprabeener’s code to \_parent my movie doesn’t play smooth anymore …

aaarrgghhh

---

<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: [February 22, 2003, 6:29pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/7 "2003-02-22T18:29:50Z")

</div>

Try changing it to “this”

this.whatever.

Any difference?

---

<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: [February 22, 2003, 6:36pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/8 "2003-02-22T18:36:56Z")

</div>

nopes … same as when i change \_root into \_parent

darn … this really sucks …

i mean how did kirupa get them random moving circles on his site ??

what do i do wrong ??

---

<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: [February 22, 2003, 6:53pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/9 "2003-02-22T18:53:54Z")

</div>

Ok, well in a case like that… try removing all locators on those objects.

I checked the script… there is an \_root when calling on the getdistance and hyp functions.

Remove the \_root before those and it should work fine (just remove it, don’t replace it with anything)

---

<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: [February 22, 2003, 7:25pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/10 "2003-02-22T19:25:37Z")

</div>

thnx dude … is working now …

only problem i have now that i try to mask the loaded movie  
but this doesn’t work …

check my site [here](http://www.xvector.tomaatnet.nl) to see what i mean …

(ps i haven’t refreshed my site yet so circles don’t move proper)

---

<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: [February 22, 2003, 8:00pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/11 "2003-02-22T20:00:14Z")

</div>

ok not working for me lost!:hair: in the external movie in the first frame i refer to two text fields which are in mc which are in buttons!

on the 1st frame i use \_root and inside the mc on 1st frame i use \_root

I have tried the diff… things you have mentioned but it doesn’t work! how should i make work when loaded into main.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: [February 22, 2003, 10:38pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/12 "2003-02-22T22:38:40Z")

</div>

Can you post up example files of what you are doing. It is hard to figure it out when I don’t have anything in front of 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: [February 22, 2003, 10:50pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/13 "2003-02-22T22:50:45Z")

</div>

Ok main.fla and date.fla

---

<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: [February 22, 2003, 10:51pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/14 "2003-02-22T22:51:23Z")

</div>

forgot date.fla

---

<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: [February 22, 2003, 10:52pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/15 "2003-02-22T22:52:33Z")

</div>

You must be on a mac or something. I get unexpected file errors.

Try putting them in a .zip file and uploading them so I can access them.

---

<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: [February 22, 2003, 11:01pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/16 "2003-02-22T23:01:34Z")

</div>

Problem I can’t zip at the moment so I’ll upload to my server! Give me 1min

---

<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: [February 22, 2003, 11:03pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/17 "2003-02-22T23:03:59Z")

</div>

k

---

<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: [February 22, 2003, 11:16pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/18 "2003-02-22T23:16:03Z")

</div>

Wow? Are you coding for Flash 4?

I am going to go through this with Flash 5+ syntax, but please feel free to revert it back to what you had before.

\_root timeline Frame 1 actions…

```php
// initial direction of drop_dateClip
direction = 0;
// date/time
days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
timedate = new Date();
todaydate = timedate.getDate();
day = timedate.getDay();
month = timedate.getMonth();
year = timedate.getFullYear();
dayname = days[day];
monthname = months[month];
clockH = timedate.getHours();
clockM = timedate.getMinutes();
clockS = timedate.getSeconds();
if (clockH<10) {
	clockH = "0"+clockH;
}
if (clockM<10) {
	clockM = "0"+clockM;
}
if (clockS<10) {
	clockS = "0"+clockS;
}
drop_dateClip.fulldate.text = dayname+", "+monthname+" "+todaydate+", "+year;
timeClip.fulltime.text = clockH+": "+clockM+": "+clockS;

```

drop dateClip frame 1 actions…

```php
stop();
_parent.drop_dateClip = this;
originalPos = _y;
openPos = _y+_height;

```

drop dateClip frame 2 actions…

```php
oldPos = _y;
newPos = oldPos+(direction*5);
if (direction == -1 and newPos>=originalPos) {
	this._y = newPos;
}
if (direction == 1 and newPos<=openPos) {
	this._y = newPos;
}

```

Timeclip frame 1 actions

```php
_parent._parent.timeClip = this;

```

(requires 2 \_parents because it is located in a clip in a clip).

Time Layer Button…

```php
on (rollOver) {
	drop_dateClip.play();
	drop_dateClip.direction = 1;
}
on (rollOut) {
	drop_dateClip.play();
	drop_dateClip.direction = -1;
}

```

That is all. It worked great for me. Just had to change all the locators. And that old syntax (unless your coding for Flash 4) had to go :-\

---

<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: [February 22, 2003, 11:21pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/19 "2003-02-22T23:21:50Z")

</div>

Thanks lost! Just a question when you said the code was “old” where did you make the changes? Could it be changed further for 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: [February 22, 2003, 11:28pm UTC](https://forum.kirupa.com/t/load-external-movie-headache/14102/20 "2003-02-22T23:28:52Z")

</div>

What changed…

setProperty… rarely used anymore. I used this.\_y instead.

And tellTarget is gone… so I used the new dot syntax for your buttons. As you can tell, that code is different.

As for furthering with MX… you COULD, but everything works fine now, so there is no need to get a headache over figuring everything out all over again.

But… if you wanted… in your main.fla file you can create your empty movie clip dynamcially… since it will be easy, I will show you how.

```php
_root.createEmptyMovieClip("container", 1);
_root.container.loadMovie("date.swf");
_root.container._x = _root.container._y=50;

```

It creates the clip called container on level 1. Then loads the movie to container. Then positions both the \_x and \_y position to 50. ANd voila… your main.fla is completely void of anything other than actions 🙂

[Next page](https://forum.kirupa.com/t/load-external-movie-headache/14102.md?page=2)
