Package | com.bit101.components |
Class | public class WheelMenu |
Inheritance | WheelMenu ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
borderColor : uint
Gets / sets the color of the border around buttons.
|
WheelMenu | ||
color : uint
Gets / sets the base color of buttons.
|
WheelMenu | ||
![]() |
enabled : Boolean
Sets/gets whether this component is enabled or not.
|
Component | |
![]() |
height : Number [override]
Sets/gets the height of the component.
|
Component | |
highlightColor : uint
Gets / sets the highlighted color of buttons.
|
WheelMenu | ||
selectedIndex : int [read-only]
Gets the selected index.
|
WheelMenu | ||
selectedItem : Object [read-only]
Gets the selected item.
|
WheelMenu | ||
![]() |
tag : int
Sets/gets in integer that can identify the component.
|
Component | |
![]() |
width : Number [override]
Sets/gets the width of the component.
|
Component | |
![]() |
x : Number [override] [write-only]
Overrides the setter for x to always place the component on a whole pixel.
|
Component | |
![]() |
y : Number [override] [write-only]
Overrides the setter for y to always place the component on a whole pixel.
|
Component |
Property | Defined By | ||
---|---|---|---|
_borderColor : uint = 0xcccccc | WheelMenu | ||
_buttons : Array | WheelMenu | ||
_color : uint = 0xffffff | WheelMenu | ||
![]() |
_enabled : Boolean = true | Component | |
![]() |
_height : Number = 0 | Component | |
_highlightColor : uint = 0xeeeeee | WheelMenu | ||
_iconRadius : Number | WheelMenu | ||
_innerRadius : Number | WheelMenu | ||
_items : Array | WheelMenu | ||
_numButtons : int | WheelMenu | ||
_outerRadius : Number | WheelMenu | ||
![]() |
Ronda : Class | Component | |
_selectedIndex : int = -1 | WheelMenu | ||
_startingAngle : Number = -90 | WheelMenu | ||
![]() |
_tag : int = -1 | Component | |
![]() |
_width : Number = 0 | Component |
Method | Defined By | ||
---|---|---|---|
WheelMenu(parent:DisplayObjectContainer, numButtons:int, outerRadius:Number = 80, iconRadius:Number = 60, innerRadius:Number = 10, defaultHandler:Function = null)
Constructor
|
WheelMenu | ||
![]() |
draw():void
Abstract draw function.
|
Component | |
hide():void
Hides the menu.
|
WheelMenu | ||
![]() |
initStage(stage:Stage):void
[static]
Utility method to set up usual stage align and scaling.
|
Component | |
![]() |
move(xpos:Number, ypos:Number):void
Moves the component to the specified position.
|
Component | |
setItem(index:int, iconOrLabel:Object, data:Object = null):void
Sets the icon / text and data for a specific menu item.
|
WheelMenu | ||
![]() |
setSize(w:Number, h:Number):void
Sets the size of the component.
|
Component | |
show():void
Shows the menu - placing it on top level of parent and centering around mouse.
|
WheelMenu |
Method | Defined By | ||
---|---|---|---|
![]() |
addChildren():void
Overriden in subclasses to create child display objects.
|
Component | |
![]() |
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
|
Component | |
init():void
[override]
Initializes the component.
|
WheelMenu | ||
![]() |
invalidate():void
Marks the component to be redrawn on the next frame.
|
Component | |
makeButtons():void
Creates the buttons that make up the wheel menu.
|
WheelMenu | ||
onAddedToStage(event:Event):void
Called when the component is added to the stage.
|
WheelMenu | ||
![]() |
onInvalidate(event:Event):void
Called one frame after invalidate is called.
|
Component | |
onRemovedFromStage(event:Event):void
Called when the component is removed from the stage.
|
WheelMenu | ||
onSelect(event:Event):void
Called when one of the buttons is selected.
|
WheelMenu | ||
onStageMouseUp(event:MouseEvent):void
Called when mouse is released.
|
WheelMenu |
_borderColor | property |
protected var _borderColor:uint = 0xcccccc
_buttons | property |
protected var _buttons:Array
_color | property |
protected var _color:uint = 0xffffff
_highlightColor | property |
protected var _highlightColor:uint = 0xeeeeee
_iconRadius | property |
protected var _iconRadius:Number
_innerRadius | property |
protected var _innerRadius:Number
_items | property |
protected var _items:Array
_numButtons | property |
protected var _numButtons:int
_outerRadius | property |
protected var _outerRadius:Number
_selectedIndex | property |
protected var _selectedIndex:int = -1
_startingAngle | property |
protected var _startingAngle:Number = -90
borderColor | property |
borderColor:uint
Gets / sets the color of the border around buttons.
public function get borderColor():uint
public function set borderColor(value:uint):void
color | property |
color:uint
Gets / sets the base color of buttons.
public function get color():uint
public function set color(value:uint):void
highlightColor | property |
highlightColor:uint
Gets / sets the highlighted color of buttons.
public function get highlightColor():uint
public function set highlightColor(value:uint):void
selectedIndex | property |
selectedIndex:int
[read-only]
Gets the selected index.
public function get selectedIndex():int
selectedItem | property |
selectedItem:Object
[read-only]
Gets the selected item.
public function get selectedItem():Object
WheelMenu | () | Constructor |
public function WheelMenu(parent:DisplayObjectContainer, numButtons:int, outerRadius:Number = 80, iconRadius:Number = 60, innerRadius:Number = 10, defaultHandler:Function = null)
Constructor
Parameters
parent:DisplayObjectContainer — The parent DisplayObjectContainer on which to add this component.
|
|
numButtons:int — The number of segments in the menu
|
|
outerRadius:Number (default = 80 ) — The radius of the menu as a whole.
|
|
iconRadius:Number (default = 60 ) — The event handling function to handle the default event for this component (select in this case).
|
|
innerRadius:Number (default = 10 )
|
|
defaultHandler:Function (default = null )
|
hide | () | method |
public function hide():void
Hides the menu.
init | () | method |
override protected function init():void
Initializes the component.
makeButtons | () | method |
protected function makeButtons():void
Creates the buttons that make up the wheel menu.
onAddedToStage | () | method |
protected function onAddedToStage(event:Event):void
Called when the component is added to the stage. Adds mouse listeners to the stage.
Parameters
event:Event |
onRemovedFromStage | () | method |
protected function onRemovedFromStage(event:Event):void
Called when the component is removed from the stage. Removes mouse listeners from stage.
Parameters
event:Event |
onSelect | () | method |
protected function onSelect(event:Event):void
Called when one of the buttons is selected. Sets selected index and dispatches select event.
Parameters
event:Event |
onStageMouseUp | () | method |
protected function onStageMouseUp(event:MouseEvent):void
Called when mouse is released. Hides menu.
Parameters
event:MouseEvent |
setItem | () | method |
public function setItem(index:int, iconOrLabel:Object, data:Object = null):void
Sets the icon / text and data for a specific menu item.
Parameters
index:int — The index of the item to set icon/text and data for.
|
|
iconOrLabel:Object |
|
data:Object (default = null )
|
show | () | method |
public function show():void
Shows the menu - placing it on top level of parent and centering around mouse.