Packagecom.brightcove.api.components
Classpublic class Component
InheritanceComponent Inheritance flash.events.EventDispatcher
Subclasses AudioPlayer, LayoutBox, UIObject

Abstract base class for all component objects in the player.



Public Properties
 PropertyDefined By
  component : Object
[read-only] Returns a reference to the wrapped API element in the player, which can be used to get access to new methods that might not be defined within this version of the SWC.
Component
Public Methods
 MethodDefined By
  
Component(element:Object)
Constructor.
Component
  
getAlpha():Number
Returns the alpha value of the component.
Component
  
Returns the interface for the layout container of the element.
Component
  
getDefinition():String
Returns the XML (BEML) definition of the component.
Component
  
getHeight():Number
Returns the pixel height of the component.
Component
  
getID():String
Returns the ID of the component, as defined in the XML.
Component
  
Returns whether the component is included in layout calculations and rendering in parent layout box.
Component
  
getIndex():int
Returns the index of this element in its parent's elements array.
Component
  
Returns the interface for the layout element that is the next sibling to this element in the parent containers's element array.
Component
  
getNodeName():String
Returns the node name of the element.
Component
  
Returns the interface for the layout element that is the previous sibling to this element in the parent containers's element array.
Component
  
getVisible():Boolean
Returns whether the component is visible.
Component
  
getWidth():Number
Returns the pixel width of the component.
Component
  
getX(global:Boolean = false):Number
Returns the position of the component on the x axis.
Component
  
getY(global:Boolean = false):Number
Returns the position of the component on the y axis.
Component
  
move(x:Number, y:Number, global:Boolean = false):void
Sets the x,y coordinates of the component.
Component
  
setAlpha(alpha:Number):void
Sets the alpha value of the component.
Component
  
setIncludeInLayout(includeInLayout:Boolean):void
Sets whether the component is included in layout calculations and rendering in parent layout box.
Component
  
setSize(width:Number, height:Number):void
Sets the pixel dimensions for the wrapped component.
Component
  
setVisible(visible:Boolean):void
Sets whether the component is visible.
Component
Events
 Event Summary Defined By
  Dispatched when a UI element in the player is clicked.Component
  Dispatched when a UI element in the player is rolled off.Component
  Dispatched when a UI element in the player is rolled over.Component
  Dispatched when a property changes in a bindable component.Component
Property Detail
componentproperty
component:Object  [read-only]

Returns a reference to the wrapped API element in the player, which can be used to get access to new methods that might not be defined within this version of the SWC.


Implementation
    public function get component():Object
Constructor Detail
Component()Constructor
public function Component(element:Object)

Constructor.

Parameters
element:Object — layout element to wrap and delegate all calls to.
Method Detail
getAlpha()method
public function getAlpha():Number

Returns the alpha value of the component.

Returns
Number — The alpha value of the component.
getContainer()method 
public function getContainer():LayoutBox

Returns the interface for the layout container of the element.

Returns
LayoutBox — The interface for the layout container for the layout element.
getDefinition()method 
public function getDefinition():String

Returns the XML (BEML) definition of the component.

Returns
String — The XML definition of the component as a string.
getHeight()method 
public function getHeight():Number

Returns the pixel height of the component.

Returns
Number — The pixel height of the component.
getID()method 
public function getID():String

Returns the ID of the component, as defined in the XML.

Returns
String — The string ID of the component.
getIncludeInLayout()method 
public function getIncludeInLayout():Boolean

Returns whether the component is included in layout calculations and rendering in parent layout box.

Returns
Boolean
getIndex()method 
public function getIndex():int

Returns the index of this element in its parent's elements array.

Returns
int — The index of this element in its parent's elements array.
getNextSibling()method 
public function getNextSibling():Object

Returns the interface for the layout element that is the next sibling to this element in the parent containers's element array.

Returns
Object — The interface for the next sibling layout element.
getNodeName()method 
public function getNodeName():String

Returns the node name of the element.

Returns
String — The string node name of the element.
getPreviousSibling()method 
public function getPreviousSibling():Object

Returns the interface for the layout element that is the previous sibling to this element in the parent containers's element array.

Returns
Object — The interface for the previous sibling layout element.
getVisible()method 
public function getVisible():Boolean

Returns whether the component is visible.

Returns
Boolean — Boolean value showing whether component is visible.
getWidth()method 
public function getWidth():Number

Returns the pixel width of the component.

Returns
Number — The pixel width of the component.
getX()method 
public function getX(global:Boolean = false):Number

Returns the position of the component on the x axis.

Parameters

global:Boolean (default = false) — Whether to return the x position on the stage, not relative to the component container.

Returns
Number — The position of the component on the x axis.
getY()method 
public function getY(global:Boolean = false):Number

Returns the position of the component on the y axis.

Parameters

global:Boolean (default = false) — Whether to return the y position on the stage, not relative to the component container.

Returns
Number — The position of the component on the y axis.
move()method 
public function move(x:Number, y:Number, global:Boolean = false):void

Sets the x,y coordinates of the component.

Parameters

x:Number — The position on the x axis to place the component.
 
y:Number — The position on the y axis to place the component.
 
global:Boolean (default = false) — Whether to use the global coordinate space, not local (default).

setAlpha()method 
public function setAlpha(alpha:Number):void

Sets the alpha value of the component.

Parameters

alpha:Number — alpha value of the component.

setIncludeInLayout()method 
public function setIncludeInLayout(includeInLayout:Boolean):void

Sets whether the component is included in layout calculations and rendering in parent layout box.

Parameters

includeInLayout:Boolean — Boolean value determining whether component is included in layout.

setSize()method 
public function setSize(width:Number, height:Number):void

Sets the pixel dimensions for the wrapped component.

Parameters

width:Number — pixel width to set the component to.
 
height:Number — pixel height to set the component to.

setVisible()method 
public function setVisible(visible:Boolean):void

Sets whether the component is visible.

Parameters

visible:Boolean — value determining whether component is visible.

Event Detail
elementClick Event
Event Object Type: com.brightcove.api.events.BEMLMouseEvent
BEMLMouseEvent.type property = com.brightcove.api.events.BEMLMouseEvent.CLICK

Dispatched when a UI element in the player is clicked.

The BEMLMouseEvent.CLICK constant defines the value of the type property of the event object for a elementClick event.
elementRollOut Event  
Event Object Type: com.brightcove.api.events.BEMLMouseEvent
BEMLMouseEvent.type property = com.brightcove.api.events.BEMLMouseEvent.ROLL_OUT

Dispatched when a UI element in the player is rolled off.

The BEMLMouseEvent.ROLL_OUT constant defines the value of the type property of the event object for a elementRollOut event.
elementRollOver Event  
Event Object Type: com.brightcove.api.events.BEMLMouseEvent
BEMLMouseEvent.type property = com.brightcove.api.events.BEMLMouseEvent.ROLL_OVER

Dispatched when a UI element in the player is rolled over.

The BEMLMouseEvent.ROLL_OVER constant defines the value of the type property of the event object for a elementRollOver event.
propertyChange Event  
Event Object Type: com.brightcove.api.events.PropertyChangeEvent
PropertyChangeEvent.type property = com.brightcove.api.events.PropertyChangeEvent.CHANGE

Dispatched when a property changes in a bindable component.

The PropertyChangeEvent.CHANGE constant defines the value of the type property of the event object for a propertyChange event.