Page 1 of 1

_root.attachMovie(...)

Posted: 17 Sep 2011, 15:29
by Artur
Hiello.

Maybe it's stupid question, but may I know why function _root.attachMovie not works with imagevue?
I have MC called "my_MC", instance of "my_MC", exported for actionscript, deleted from stage, but keeped in library .

I trying call function like this:
Code
_root.attachMovie("my_MC", "my_MC2", _root.getNextHighestDepth());
this also not works:
Code
var container:MovieClip = _root.createEmptyMovieClip("container", _root.getNextHighestDepth());
container.attachMovie("my_MC", "my_MC2", container.getNextHighestDepth());
Works only "loadMovie" function, but then I can't control functions in "my_MC"...

Thanks for any reply :wink:

Re: _root.attachMovie(...)

Posted: 18 Sep 2011, 10:49
by mjau-mjau
I am not sure it is that simple and there may be some restrictions ... As far as I can remember, you might not be able to attachMovie from a loaded SWF in a parent SWF ... or at least not control it from the loaded SWF. I am not sure, but perhaps you can try to set a static depth like 8888 or something instead of getNextHighestDepth?

Re: _root.attachMovie(...)

Posted: 18 Sep 2011, 14:05
by Artur
This helps a little bit:
Code
this._lockroot=true;
Now attachMovie works well and I can control it from my swf.. But, the depth of MC is somewhere between my swf, and _root :(
I will try play with static depth, like you suggest.

Thanks.