![MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual Download Page 335](http://html1.mh-extra.com/html/macromedia/flash-mx-2004-actionscript/flash-mx-2004-actionscript_reference-manual_3378897335.webp)
ContextMenu class
335
You create a
colorTransformObject
parameter as follows:
myColorTransform
= new Object();
myColorTransform
.ra =
50
;
myColorTransform
.rb =
244
;
myColorTransform
.ga =
40
;
myColorTransform
.gb =
112
;
myColorTransform
.ba =
12
;
myColorTransform
.bb =
90
;
myColorTransform
.aa =
40
;
myColorTransform
.ab =
70
;
You can also use the following syntax to create a
colorTransformObject
parameter:
myColorTransform
= { ra: ‘
50
’, rb: ‘
244
’, ga: ‘
40
’, gb: ‘
112
’, ba: ‘
12
’, bb:
‘
90
’, aa: ‘
40
’, ab: ‘
70
’}
Example
This example creates a new Color object for a target SWF file, creates a generic object called
myColorTransform
with the properties defined above, and uses the
setTransform()
method to
pass the
colorTransformObject
to a Color object. To use this code in a Flash (FLA) document,
place it on Frame 1 on the main Timeline and place a movie clip on the Stage with the instance
name
my_mc
, as in the following code:
// Create a color object called
my_color
for the target
my_mc
my_color = new Color(my_mc);
// Create a color transform object called
myColorTransform
using
// the generic Object object
myColorTransform = new Object();
// Set the values for
myColorTransform
myColorTransform = { ra: '50', rb: '244', ga: '40', gb: '112', ba: '12', bb:
'90', aa: '40', ab: '70'};
// Associate the color transform object with the Color object
// created for
my_mc
my_color.setTransform(myColorTransform);
ContextMenu class
Availability
Flash Player 7.
Description
The ContextMenu class provides runtime control over the items in the Flash Player context
menu, which appears when a user right-clicks (Windows) or Control-clicks (Macintosh) on Flash
Player. You can use the methods and properties of the ContextMenu class to add custom menu
items, control the display of the built-in context menu items (for example, Zoom In and Print),
or create copies of menus.
You can attach a ContextMenu object to a specific button, movie clip, or text field object, or to an
entire movie level. You use the
menu
property of the Button, MovieClip, or TextField classes to do
this. For more information about the
menu
property, see
Button.menu
,
MovieClip.menu
, and
TextField.menu
.
To add new items to a ContextMenu object, you create a ContextMenuItem object, and then add
that object to the
ContextMenu.customItems
array. For more information about creating
context menu items, see the
ContextMenuItem class
entry.
Summary of Contents for FLASH MX 2004 - ACTIONSCRIPT
Page 1: ...ActionScript Reference Guide...
Page 8: ...8 Contents...
Page 12: ......
Page 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Page 54: ...54 Chapter 2 ActionScript Basics...
Page 80: ...80 Chapter 3 Writing and Debugging Scripts...
Page 82: ......
Page 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Page 112: ......
Page 120: ...120 Chapter 6 Using the Built In Classes...
Page 176: ......
Page 192: ...192 Chapter 10 Working with External Data...
Page 202: ...202 Chapter 11 Working with External Media...
Page 204: ......
Page 782: ...782 Chapter 12 ActionScript Dictionary...
Page 793: ...Other keys 793 221 222 Key Key code...
Page 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Page 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Page 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Page 816: ...816 Index...