Hi Jiri,

This is a common question here.

Negative levels are used by the Flash IDE. Whenever you create an instance of an
object on the stage on the IDE, it automatically gets a negative depth.

That's why removeMocieClip() does not work on negative depths.

You may remove a dynamically created clip that resides on a negative depth
if you first swap its depth with a positive depth. (prefereable a big one to make
sure there is no clip there

myClip.swapDepths(199999);
myClip.removeMovieClip();

BUT

I suggest you never use negative depths. It gives you nothing but trouble.
You may find yourself spending hours to debug some code because you
forgot that some movieclips have negative depth.

You've got so many positive number to use as depths that it's totally
unneccessary to use negative values.

Regards,
Dimitrios Bendilas

----- Original Message ----- From: "Jiri Heitlager" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, April 08, 2006 12:05 PM
Subject: [Flashcoders] Question on removeMovieClip


He list,

I came across something that i find very weird and cant remember coming across it before. The thing is when I attach a movie to stage on a negative level, I can't remove it anymore with removeMovieClip().

An example.

_root.attachMovie("mc" , "mc" , -100);

_root.onMouseDown = function(){
_root.mc.removeMovieClip()

}

Can somebody explain why that is?

Jiri


--
-----------

Jiri Heitlager
Stichting z25.org
Concordiastraat 67A
3551 EM Utrecht

tel:06-28159323
http://www.z25.org
[EMAIL PROTECTED]
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to