I've also found a few quirks with removeMovieClip... however most of them seem to be related to depth. I use this class whenever I remove a clip (dynamically attached or otherwise), and it seems to do the trick.

The MovieClipRemover class is a static utility class which removes timeline movieclips

usage example:

class MovieClipRemover {
        // constructor
        function MovieClipRemover () {}
        // remove a timeline (or any depth) movieclip from the stage
        static function remove (mc:MovieClip) {
                var parent:MovieClip = mc._parent;
                if (parent != null) {
                        var tempMC:MovieClip = parent.getInstanceAtDepth(0);
                        mc._visible = false;
                        if (tempMC != undefined) tempMC.swapDepths(0);


On Aug 21, 2006, at 11:34 AM, [EMAIL PROTECTED] wrote:

Have you tried using some kind of factory type approach
to manage your deletion/creation?

yes, i use adts quite often...in fact i use the mvc pattern for quite a few apps i create. So i have views that instantiate whatever movieclips it needs and deletes them when it doesn't need them. the problem begins when a view needs to go away either because it is being replaced by another view or refreshed. i noticed that the clips that were supposed to be deleted weren't really...futhermore, when being reinstantiated, they won't accept values...they exist, but they're undefined somehow...


To change your subscription options or search the archive:

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training

Reply via email to