all groups > flash actionscript > may 2005 >
You're in the

flash actionscript

group:

removeMovieClip doesn't work properly


removeMovieClip doesn't work properly Porsche_2004
5/2/2005 12:00:00 AM
flash actionscript:
Hi,

I'm trying remove an attached movie clip... but the code doesn't work... Why?

Regards,


_root.attachMovie("movieClip", "my_mc", _root.getNextHighestDepth());
my_mc.removeMovieClip();
removeMovieClip(my_mc);
removeMovieClip(_root["my_mc"]);
Re: removeMovieClip doesn't work properly LuigiL
5/2/2005 12:00:00 AM
removeMovieClip(_root.my_mc);
removeMovieClip(_level0.my_mc);
Re: removeMovieClip doesn't work properly Porsche_2004
5/2/2005 12:00:00 AM
Sorry,

It doesn't work yet !!!!!!

removeMovieClip(_root.my_mc);
trace(_root.my_mc); // it still returns the object
Re: removeMovieClip doesn't work properly LuigiL
5/2/2005 12:00:00 AM
Re: removeMovieClip doesn't work properly LuigiL
5/2/2005 12:00:00 AM
Sorry, typo!
Re: removeMovieClip doesn't work properly Porsche_2004
5/2/2005 12:00:00 AM
I've tried every possible forms... Wondering it doesn't work!! I used unloadMovie instead... But I could not understand why... You can try the code by a simple movie clip...

Thanx
Re: removeMovieClip doesn't work properly LuigiL
5/2/2005 12:00:00 AM
The manual states that you should use my_mc.removeMovieClip(); when you want to
remove a clip created with attachMovie(); So, when you are referencing
correctly... this should work.
I will try the code myself.
Re: removeMovieClip doesn't work properly LuigiL
5/2/2005 12:00:00 AM
Re: removeMovieClip doesn't work properly lumeeguvnor
5/2/2005 12:00:00 AM
works fine for me
_root.attachMovie("movieClip", "my_mc", _root.getNextHighestDepth());
my_mc.removeMovieClip();
the code means that you do not see the "my_mc"
if you put the my_mc.remove MovieClip(); in a button handler eg
my_btn.onRelease = function() {
my_mc.removeMovieClip();
}
then you can see it happen better
Re: removeMovieClip doesn't work properly I flash therefore I am
5/2/2005 12:00:00 AM
What is the depth of the thing you are trying to remove?

trace(my_mc.getDepth());

And are you using any UI components? They ruin the functionality of
getNextHighestDepth().

AddThis Social Bookmark Button