InteractiveObject Flash abstract class

The InteractiveObject class is a core class in Flash player. InteractiveObject is an abstract base class so you cannot create instances of it. Also, you cannot subclass it yourself because it is not a complete class. InteractiveObject is a subclass of DisplayObject and adds support for interacting with the user of the Flash application. Flash classes which are not subclasses of InteractiveObject, such as Shape and StaticText, do not respond to mouse or keyboard actions.

Display classes can only interact with user events if they are currently on the Flash display list. Classes are placed on the display list through the addChild(obj:DisplayObject) method on DisplayObjectContainer. For your class to support the interactivity described below, please ensure that it is on the display list. You can check the stage property to see if the object is in the display list. See the articles on the display list and DisplayObject for more information.

InteractiveObject supports the contextMenu:NativeMenu property. You can use this to specify a ContextMenu or a NativeMenu. NativeMenu is only supported by the AIR runtime, not the Flash player. If you assign a custom ContextMenu to the InteractiveObject it will be displayed when the user right-clicks on the object.

You can enable or disable support for different kinds of user interaction on InteractiveObject using the doubleClickEnabled, mouseEnabled, and tabEnabled properties. These properties can be the source of some consternation, particularly the doubleClickEnabled property which defaults to false. This means that typical components will not receive the doubleClick event.

Setting tabEnabled will allow users to use keyboard navigation to reach the component in the tab order. This property is false by default except for SimpleButtons, TextFields with type="input", and Sprites and MovieClips with buttonMode=true. Setting tabIndex to anything other than -1 will disable the automatic tab ordering for the entire Flash player.

Search Great Flex/Flash Sites