Skip to main content
April 12, 2007
Question

attachMovie problem....

  • April 12, 2007
  • 1 reply
  • 136 views
I have a shell that loads in a swf file into a movie clip called "content_mc". I'm trying to attach a movie clip INTO this movie clip but it doesn't seem to work.

If I do it this way:
_root.createEmptyMovieClip("booger_mc",_root.getNextHighestDepth());
booger_mc.attachMovie("textOnly","blah_mc",booger_mc.getNextHighestDepth())
booger_mc._x = _root.content_mc._x + 360;
booger_mc._y = _root.content_mc._y + 30;

it works just fine..

but if I do it this way:
_root.content_mc.createEmptyMovieClip("subpage_mc",_root.content_mc.getNextHighestDepth());
_root.content_mc.subpage_mc._x = 360;
_root.content_mc.subpage_mc._y = 30;
_root.content_mc.subpage_mc.attachMovie("textOnly","blah_mc",_root.content_mc.subpage_mc.getNextHighestDepth());

it won't load... to do a test, I did this:
_root.content_mc.createEmptyMovieClip("subpage_mc",_root.content_mc.getNextHighestDepth());
_root.content_mc.subpage_mc._x = 360;
_root.content_mc.subpage_mc._y = 30;
_root.content_mc.subpage_mc.createTextField("temp_txt",1000,0,0,500,500);
_root.content_mc.subpage_mc.temp_txt.text = "this is a test";

and it will create the text box..

why won't it attach the movie..

basically I have a "shell" swf file, and clicking a link will load in different swf files to the content_mc.

The textOnly linked mc is in the shell library.

Any help on this? 🙂
This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 12, 2007
i don't see where you're loading anything. but i also don't see a problem with the code you posted as long as _root.content_mc exists when your 2nd code snippet executes.