Packageorg.juicekit.visual.controls
Classpublic class MovieClipControlBase
InheritanceMovieClipControlBase Inheritance RendererBase Inheritance mx.core.UIComponent
SubclassesDMAMapControl, USMapControl

The MovieClipControlBase class provides a wrapper for a Flash MovieClip that contains SimpleButton children. The wrapped MovieClip's SimpleButton children dispatch mouse events and are colored based on data and a colorEncoding function.

Note: This class is only a base class for more specific classes.



Public Properties
 PropertyDefined by
  colorEncodingFunction : Function
References a function that returns a uint color value that is applied to the graphical element.
MovieClipControlBase
  data : Object
Stores an Array or ArrayCollection of objects whose properties will be used to change the appearance of the the MovieClip's SimpleButton children.
MovieClipControlBase
  dataKeyField : String
Specifies the data Object property name that maps to SimpleButton instance names.
MovieClipControlBase
 InheritedlistData : BaseListData
Implement the IDropInListItemRenderer interface.
RendererBase
Protected Properties
 PropertyDefined by
  _clip : MovieClip = null
Stores a reference to the wrapped MovieClip.
MovieClipControlBase
 InheriteddataPropertyChanged : Boolean = false
Indicated whether the data property was changed.
RendererBase
Public Methods
 MethodDefined by
  
Constructor.
MovieClipControlBase
  
encodeMap(table:Array):void
Encode map colors by applying the colorEncodingFunction to the array of data objects.
MovieClipControlBase
Protected Methods
 MethodDefined by
  
calcPaddedBounds(w:Number, h:Number):Rectangle
Return a Rectangle inset by any padding styles.
MovieClipControlBase
  
clipDisplayObjectContainer():DisplayObjectContainer
Return the MovieClip's DisplayObjectContainer containing the SimpleButtons to encode.
MovieClipControlBase
 Inherited
Reset the dataPropertyChanged and invalidate the display list.
RendererBase
  
createMovieClip():MovieClip
Return an instance of a specific MovieClip derived class.
MovieClipControlBase
  
getButtonData(simpleButton:SimpleButton):Object
Return the data object associated with the target DisplayObject.
MovieClipControlBase
  
signalDataMouseEvent(event:MouseEvent):void
Dispatch a mouse event and its related data.
MovieClipControlBase
Events
 EventSummaryDefined by
 Inherited Dispatched when the data property changes.RendererBase
   Dispatched when the user clicks a pointing device over a MovieClipControlBase instance's rectangle.MovieClipControlBase
   Dispatched when the user clicks a pointing device over a MovieClipControlBase instance's rectangle.MovieClipControlBase
   Dispatched when the user moves a pointing device away from MovieClipControlBase instance's rectangle.MovieClipControlBase
   Dispatched when the user moves a pointing device over a MovieClipControlBase instance's rectangle.MovieClipControlBase
Styles
 StyleDescriptionDefined by
  
backgroundColor
Type: uint   Format: Color   CSS Inheritance: no
Specifies the opaque background color of the control. The default value is undefined. If this style is undefined, the control has a transparent background.
MovieClipControlBase
  
paddingBottom
Type: Number   Format: Length   CSS Inheritance: no
Number of pixels between the component's bottom border and the bottom edge of its content area. The default value is 0.
MovieClipControlBase
  
paddingLeft
Type: Number   Format: Length   CSS Inheritance: no
Number of pixels between the component's left border and the left edge of its content area. The default value is 0.
MovieClipControlBase
  
paddingRight
Type: Number   Format: Length   CSS Inheritance: no
Number of pixels between the component's right border and the right edge of its content area. The default value is 0.
MovieClipControlBase
  
paddingTop
Type: Number   Format: Length   CSS Inheritance: no
Number of pixels between the component's top border and the top edge of its content area. The default value is 0.
MovieClipControlBase
Property detail
_clipproperty
protected var _clip:MovieClip = null

Stores a reference to the wrapped MovieClip.

colorEncodingFunctionproperty 
colorEncodingFunction:Function  [read-write]

References a function that returns a uint color value that is applied to the graphical element. The function is passed a SimpleButton's name and a data Object matched to the name.

The function signature is:

f(name:String, data:Object):uint

The default value is null.

This property can be used as the source for data binding.

Implementation
    public function get colorEncodingFunction():Function
    public function set colorEncodingFunction(value:Function):void
dataproperty 
data:Object  [read-write]

Stores an Array or ArrayCollection of objects whose properties will be used to change the appearance of the the MovieClip's SimpleButton children.

Implementation
    public function get data():Object
    public function set data(value:Object):void
dataKeyFieldproperty 
dataKeyField:String  [read-write]

Specifies the data Object property name that maps to SimpleButton instance names.

The default value is "name".

This property can be used as the source for data binding.

Implementation
    public function get dataKeyField():String
    public function set dataKeyField(value:String):void
Constructor detail
MovieClipControlBase()constructor
public function MovieClipControlBase()

Constructor.

Method detail
calcPaddedBounds()method
protected function calcPaddedBounds(w:Number, h:Number):Rectangle

Return a Rectangle inset by any padding styles.

Parameters
w:Number — Is the maximum width before any padding is subtracted.
 
h:Number — Is the maximum height before any padding is subtracted.

Returns
Rectangle — Returns a rectangle inset by the padding styles.
clipDisplayObjectContainer()method 
protected function clipDisplayObjectContainer():DisplayObjectContainer

Return the MovieClip's DisplayObjectContainer containing the SimpleButtons to encode.

Returns
DisplayObjectContainer
createMovieClip()method 
protected function createMovieClip():MovieClip

Return an instance of a specific MovieClip derived class.

Note: This method is required to be overridden in the derived class.

Returns
MovieClip
encodeMap()method 
public function encodeMap(table:Array):void

Encode map colors by applying the colorEncodingFunction to the array of data objects.

Parameters
table:Array
getButtonData()method 
protected function getButtonData(simpleButton:SimpleButton):Object

Return the data object associated with the target DisplayObject.

Parameters
simpleButton:SimpleButton

Returns
Object
signalDataMouseEvent()method 
protected function signalDataMouseEvent(event:MouseEvent):void

Dispatch a mouse event and its related data.

Parameters
event:MouseEvent
Event detail
jkDataClickevent 
Event object type: org.juicekit.events.DataMouseEvent

Dispatched when the user clicks a pointing device over a MovieClipControlBase instance's rectangle.

jkDataDoubleClickevent  
Event object type: org.juicekit.events.DataMouseEvent

Dispatched when the user clicks a pointing device over a MovieClipControlBase instance's rectangle.

jkDataMouseOutevent  
Event object type: org.juicekit.events.DataMouseEvent

Dispatched when the user moves a pointing device away from MovieClipControlBase instance's rectangle.

jkDataMouseOverevent  
Event object type: org.juicekit.events.DataMouseEvent

Dispatched when the user moves a pointing device over a MovieClipControlBase instance's rectangle.