User Guide

MovieClip.onData 597
Example
The following example lets you right-click or Control-click a movie clip on the Stage and select
“Info...” from the context menu to view information about that instance. Add several movie clips
with instance names, and then add the following ActionScript to your AS or FLA file:
var menu_cm:ContextMenu = new ContextMenu();
menu_cm.customItems.push(new ContextMenuItem("Info...", getMCInfo));
function getMCInfo(target_mc:MovieClip, obj:Object) {
trace("You clicked on the movie clip '"+target_mc._name+"'.");
trace("\t width:"+target_mc._width+", height:"+target_mc._height);
trace("");
}
for (var i in this) {
if (typeof (this[i]) == 'movieclip') {
this[i].menu = menu_cm;
}
}
MovieClip.nextFrame()
Availability
Flash Player 5.
Usage
my_mc.nextFrame() : Void
Parameters
None.
Returns
Nothing.
Description
Method; sends the playhead to the next frame and stops it.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
See also
MovieClip.prevFrame()
MovieClip.onData
Availability
Flash Player 6.
Usage
my_mc.onData = function() {
// your statements here
}