 import mx.managers.SystemManager;
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;
+import mx.core.IVisualElementContainer;
+import mx.core.IVisualElement;
 
 use namespace mx_internal;
 

    {
        suspendEventHandling();
        // Add the child back to the parent so the effect can play upon it
        parent.addChildAt(target, index);
        resumeEventHandling();
        // Use target because the player assigns the Stage to the currentTarget when we leave the scope of the event handler function
        createAndPlayEffect(eventObj, target); 

                    // Since we added the child back to the parent when the effect began,
                    // we need to remove it once the effect has finished.
                    suspendEventHandling();
                    if (parent is IVisualElementContainer && targ is IVisualElement)
                        (IVisualElementContainer(parent).removeElement(targ as IVisualElement));
                    else
                        parent.removeChild(targ);
                    resumeEventHandling();
                }
            }
