Movieclip._Name - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

MovieClip._name

Availability
Flash Player 4.
Usage
.
my_mc
_name:String
Description
Property; the instance name of the movie clip specified by
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;
}
}
See Also
Button._name
548
Chapter 2: ActionScript Language Reference
.
my_mc

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents