To display the cursor, use the
The maximum cursor size is 32x32 pixels.Transparency is supported on most operating systems.
A native mouse cursor is implemented directly through the operating system cursor mechanism
and is a more efficient means for displaying a custom cursor image than using a display object.
You can animate the cursor by supplying more than one image in the
The cursor is only displayed within the bounds of the stage. Outside the stage, control of the cursor image returns to the operating system
The example uses the drawing commands available through the Graphics class to create
eight, rotated images of an arrow. These images are pushed into a vector and assigned to the
To display the cursor, call the
Supply more than one image and set the
The maximum cursor size is 32x32 pixels.
Suppy more than one image in the
The hotspot is the point on the cursor under which mouse clicks are registered. By default, the hot spot is the upper-left corner (0,0).
Mobile Browser Support: This class is not supported in mobile browsers.
AIR profile support: This feature is not supported
on mobile devices or AIR for TV devices. See
In Flash Player, users open the context menu by right-clicking (Windows or Linux) or Control-clicking (Macintosh) 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. In AIR, there are no built-in items and no standard context menu.
In Flash Professional, 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
In Flex or Flash Builder, only top-level components in the application can have context menus. For example, if a DataGrid control is a child of a TabNavigator or VBox container, the DataGrid control cannot have its own context menu.
To add new items to a ContextMenu object, you create a ContextMenuItem object, and then add that
object to the
Flash Player has three types of context menus: the standard menu (which appears when you right-click in Flash Player), the edit menu (which appears when you right-click a selectable or editable text field), and an error menu (which appears when a SWF file has failed to load into Flash Player). Only the standard and edit menus can be modified with the ContextMenu class. Only the edit menu appears in AIR.
Custom menu items always appear at the top of the Flash Player context menu, above any visible built-in menu items; a separator bar distinguishes built-in and custom menu items. You cannot remove the Settings menu item from the context menu. The Settings menu item is required in Flash so that users can access the settings that affect privacy and storage on their computers. You also cannot remove the About menu item, which is required so that users can find out what version of Flash Player they are using. (In AIR, the built-in Settings and About menu items are not used.)
You can add no more than 15 custom items to a context menu in Flash Player. In AIR, there is no explicit limit imposed on the number of items in a context menu.
You must use the
When creating a context menu, you can add either NativeMenuItem or ContextMenuItem objects. However, it is advisable to use only one type of object in a context menu so that all items in the menu have the same properties.
Note: In Flash Player, this method is not supported.
This method hides only menu items that appear in the standard context menu; it does not affect items that appear in the edit and error menus.
This method works by setting all the Boolean members of
Note: In AIR, context menus do not have built-in items. Calling this method will have no effect.
Note: In AIR, context menus do not have built-in items.
If the
To add new menu items, you create a ContextMenuItem object and then add it to the
Using this property is equivalent to using the
If a
The default value is
The KeyLocation constants are used in the
Enable or disable the context menu clipboard commands using the
Use the values defined by the KeyboardType class with the
Most desktop computers and some mobile devices provide an alphanumeric keyboard.
Many mobile devices provide a keypad, although some provide an alphanumeric keyboard.
Typically, a virtual keyboard is provided in the absence of a physical keyboard.
Note: You need to call
Note: You need to call
The default value is
To set values for this property, use the following string values:
Note: For Flash Player 10.2 or AIR 2.6 and later versions, this property sets or gets the cursor name
when you are using a native cursor. A native cursor name defined using
The
Note: Mouse events can be dispatched whether or not this property is
Use the constants defined in the KeyboardType class to test the values reported by this property.
Note: If a computer or device has both an alphanumeric keyboard and a 12-button keypad, this property only reports the presence of the alphanumeric keyboard.
Use the listed classes to write code that handles touch events. Use the Multitouch class to determine the current environment's support for touch interaction, and to manage the support of touch interaction if the current environment supports touch input.
You cannot create a Multitouch object directly from ActionScript code. If you call
Note: The Multitouch feature is not supported for SWF files embedded in HTML running on Mac OS.
If the Flash runtime is in an environment that does not support any multi-touch gestures, the value is
Note: For Mac OS 10.5.3 and later,
Use this property to test for multi-touch gesture support. Then, use event handlers for the available multi-touch gestures. For those gestures that are not supported in the current evironment, you'll need to create alternative event handling.
Note: For Mac OS 10.5.3 and later, this value is always
With the properties of the ContextMenuItem class you can enable or disable specific menu items, and you can make items visible or invisible.
You write an event handler for theCustom menu items appear at the top of the context menu, above any built-in items. A separator bar divides custom menu items from built-in items. In AIR, there are no built-in items and the following restrictions do not apply to content in the AIR application sandbox.
Restrictions:
Save Zoom In Zoom Out 100% Show All Quality Play Loop Rewind Forward Back Movie not loaded About Print Show Redraw Regions Debugger Undo Cut Copy Paste Delete Select All Open Open in new window Copy link
Adobe Macromedia Flash Player Settings
Note: When the player is running on a non-English system, the caption strings are compared to both the English list and the localized equivalents.
Note: A separator bar always appears between any custom menu items and the built-in menu items.