
MovieClip._parent Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
692
|
ActionScript Language Reference
Unlike its cousin onLoad(), whose callback form has limited use, onUnload() works identi-
cally whether defined as a callback or in an onClipEvent(unLoad) block. However, the
usual differences between callback handlers and onClipEvent() handlers still apply:
• When the contents of
mc are unloaded, the onUnload() callback is lost, but the
onClipEvent(unload) handler is retained.
• When
mc is duplicated via duplicateMovieClip(), the onUnload() callback is not copied
to the duplicate clip, but the onClipEvent(unLoad) handler is.
Usage
Perhaps surprisingly, in Flash 6, onUnload() is not triggered when the Flash Player is closed
or when
_level0 (the main movie) is removed from the Player. Macromedia may address
this idiosyncrasy in the future.
See Also
MovieClip.onLoad(), MovieClip.unloadMovie()
MovieClip._parent Property
a reference to the host clip or movie containing this clip
Flash 4
read-only
mc._parent
Description
The _parent property stores a reference to the clip object upon whose timeline mc resides.
Main movies don’t support the
_parent property because they are at the top level (conve-
niently referred to as
_root). References to _root._parent return undefined. The _parent
property gives us the powerful ability to manipulate clips ...