from lockroot.swf
myOtherVar -> 2
myVar -> 1
MovieClip.menu
Availability
Flash Player 7.
Usage
my_mc.menu:ContextMenu = contextMenu
Parameters
contextMenu
Description
Property; associates the specified ContextMenu object with the movie clip
ContextMenu class lets you modify the context menu that appears when the user right-clicks
(Windows) or Control-clicks (Macintosh) in Flash Player.
Example
The following example assigns the ContextMenu object
The ContextMenu object contains a custom menu item labeled "View Image in Browser..." that
has an associated function named
var menu_cm:ContextMenu = new ContextMenu();
menu_cm.customItems.push(new ContextMenuItem("View Image in Browser...",
viewImage));
this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
target_mc.menu = menu_cm;
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip("photo1.jpg", image_mc);
function viewImage(target_mc:MovieClip, obj:Object) {
getURL(target_mc._url, "_blank");
}
When you right-click or Control-click the image at runtime, select View Image in Browser from
the context menu to open the image in a browser window.
See also
ContextMenu
class,
A ContextMenu object.
viewImage()
ContextMenuItem
menu_cm
.
class,
TextField.menu
. The
my_mc
to the movie clip
image_mc
MovieClip.menu
.
595
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?