View Full Version : Remove child / scope
Ricky55
January 21st, 2010, 10:57 AM
Hi
How do I remove a child from the root timeline from within a movieclip?
I've tried
MovieClip(parent).removeChild(mc1);
But this through an error.
Thanks in advance.
IQAndreas
January 21st, 2010, 11:03 AM
What error do you get? Please post the exact message so we can help you further.
Also, now and again it may be another line giving you an error. Try commenting out the line, and if the error is still there, look elsewhere for the error.
Ricky55
January 28th, 2010, 04:10 PM
Thanks for replying, sorry for late reply I've been struggling to access the site been really slow.
Anyhow the error I get is 1120: Access of undefined property mc1.
Ricky55
January 28th, 2010, 04:14 PM
Thanks for replying, sorry for late reply I've been struggling to access the site been really slow.
Anyhow the error I get is 1120: Access of undefined property mc1.
IQAndreas
January 28th, 2010, 04:15 PM
Try any one of these and see if one of them works for you:
MovieClip(parent).removeChild(this);
MovieClip(parent).removeChild(MovieClip(parent).ge tChildByName("mc1"));
Ricky55
January 28th, 2010, 04:51 PM
Thanks man the second option works, the first one just removes its self.
Thanks again!!
Ricky55
January 28th, 2010, 04:54 PM
Thanks man the second option works, the first one just removes its self.
Thanks again!!
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.