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.

Returns<br />

String - A string that lists all of the properties of the ColorTransform object.<br />

Example<br />

The following example creates the ColorTransform object colorTrans <strong>and</strong> calls its<br />

toSting() method. This method results in a string with the following format:<br />

(redMultiplier=RM, greenMultiplier=GM, blueMultiplier=BM, alphaMultiplier=AM,<br />

redOffset=RO, greenOffset=GO, blueOffset=BO, alphaOffset=AO).<br />

import flash.geom.ColorTransform;<br />

var colorTrans:ColorTransform = new ColorTransform(1, 2, 3, 4, -255, -128,<br />

128, 255);<br />

trace(colorTrans.toString());<br />

// (redMultiplier=1, greenMultiplier=2, blueMultiplier=3,<br />

alphaMultiplier=4, redOffset=-255, greenOffset=-128, blueOffset=128,<br />

alphaOffset=255)<br />

ContextMenu<br />

Object<br />

|<br />

+-ContextMenu<br />

public dynamic class ContextMenu<br />

extends Object<br />

The ContextMenu class provides runtime control over the items in the Flash Player context<br />

menu, which appears when a user right-clicks (Windows) or Control-clicks (Macintosh) on<br />

Flash Player. You can use the methods <strong>and</strong> properties of the ContextMenu class to add custom<br />

menu items, control the display of the built-in context menu items (for example, Zoom In<br />

<strong>and</strong> Print), or create copies of menus.<br />

You can attach a ContextMenu object to a specific button, movie clip, or text field object, or<br />

to an entire movie level. You use the menu property of the Button, MovieClip, or TextField<br />

classes to do this. For more information about the menu property, see Button.menu,<br />

MovieClip.menu, <strong>and</strong> TextField.menu.<br />

To add new items to a ContextMenu object, you create a ContextMenuItem object, <strong>and</strong> then<br />

add that object to the ContextMenu.customItems array. For more information about<br />

creating context menu items, see the ContextMenuItem class entry.<br />

448 <strong>ActionScript</strong> classes

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

Saved successfully!

Ooh no, something went wrong!