03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

from current SWF file<br />

dumpRoot -> [type Function]<br />

$version -> WIN 7,0,19,0<br />

nolockroot_mc -> _level0.nolockroot_mc<br />

lockroot_mc -> _level0.lockroot_mc<br />

from nolockroot.swf<br />

myOtherVar -> 2<br />

myVar -> 1<br />

from lockroot.swf<br />

myOtherVar -> 2<br />

myVar -> 1<br />

See also<br />

_root property, _lockroot (MovieClip._lockroot property), attachMovie<br />

(MovieClip.attachMovie method), loadMovie (MovieClip.loadMovie method),<br />

onLoadInit (MovieClipLoader.onLoadInit event listener)<br />

menu (MovieClip.menu property)<br />

public menu : ContextMenu<br />

Associates the specified ContextMenu object with the movie clip. The ContextMenu class lets<br />

you modify the context menu that appears when the user right-clicks (Windows) or Controlclicks<br />

(Macintosh) in Flash Player.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 7<br />

Example<br />

The following example assigns the menu_cm ContextMenu object to the image_mc movie clip.<br />

The ContextMenu object contains a custom menu item labeled "View Image in Browser" that<br />

has an associated function named viewImage():<br />

var menu_cm:ContextMenu = new ContextMenu();<br />

menu_cm.customItems.push(new ContextMenuItem("View Image in Browser...",<br />

viewImage));<br />

this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());<br />

var mclListener:Object = new Object();<br />

mclListener.onLoadInit = function(target_mc:MovieClip) {<br />

target_mc.menu = menu_cm;<br />

};<br />

var image_mcl:MovieClipLoader = new MovieClipLoader();<br />

image_mcl.addListener(mclListener);<br />

image_mcl.loadClip("photo1.jpg", image_mc);<br />

910 <strong>ActionScript</strong> classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!