Class fever.app.menu.FvContextMenuItem

Description

FvContextMenuItem class is a wrapper for orignal Adobe ContextMenuItem class.

Automatically register item callback to dispatch fever.app.menu.FvContextMenuEvent.onContextItemEVENT event.

FvContextMenuItem still dynamic.

Take a look at FvContextMenu for example.

See Also

Field Index

__KEY, contextMenuOwner, onContextItemEVENT, PREFIX_ROOT

Method Index

new FvContextMenuItem()
addEventListener(), getCaption(), removeAllListeners(), removeEventListener(), setCaption(), toString()

Constructor Detail

FvContextMenuItem

public function FvContextMenuItem(label:String, useSeparator:Boolean, enabled:Boolean, visible:Boolean)

Constructor.

Parameters

labelA String that specifies the menu item caption (text) displayed in the context menu.
useSeparator(optional) A Boolean value that indicates whether a separator bar should appear above the specified menu item
enabled(optional) A Boolean value that indicates whether the specified menu item is enabled or disabled.
visible(optional) A Boolean value that indicates whether the specified menu item is visible when the Flash Player context menu is displayed.

Field Detail

onContextItemEVENT

static public onContextItemEVENT:EventType
Dispatched whe user click on context menu item.

__KEY

public __KEY:Number

PREFIX_ROOT

static public PREFIX_ROOT:String
String used to prefix the label item.

contextMenuOwner

public contextMenuOwner:FvContextMenu
FvContextMenu instance which contain this item.

Method Detail

setCaption

public function setCaption(txt:String):Void

Sets caption

getCaption

public function getCaption():String

Returns item caption

addEventListener

public function addEventListener(type:EventType, listener):Void

Adds passed-in listener for receiving passed-in type event.

Parameters

typeName of the Event.
listenerListener object.

removeEventListener

public function removeEventListener(type:EventType, listener):Void

Removes passed-in listener that suscribed for passed-in type event.

Parameters

typeName of the Event.
listenerListener object.

removeAllListeners

public function removeAllListeners():Void

Removes all listeners.

toString

public function toString():String

Returns string representation.