Packagecom.brightcove.api.components
Classpublic class ViewStack
InheritanceViewStack Inheritance LayoutBox Inheritance Component Inheritance flash.events.EventDispatcher

A ViewStack container element in the player.



Public Properties
 PropertyDefined By
 Inheritedcomponent : 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
  
ViewStack(element:Object)
Constructor.
ViewStack
  
appendChild(child:String):Boolean
[override] Adds a new child element to the end of the box children array.
ViewStack
 Inherited
getAlpha():Number
Returns the alpha value of the component.
Component
 Inherited
Returns the background color for the box.
LayoutBox
 Inherited
Returns the background image for the box.
LayoutBox
 Inherited
getChildAt(index:uint):Object
Returns the child element from the box children array at the specified index.
LayoutBox
 Inherited
Returns the interface for the layout container of the element.
Component
 Inherited
getDefinition():String
Returns the XML (BEML) definition of the component.
Component
 Inherited
getGutter():Number
Returns the number of pixels for the buffer between elements in the container.
LayoutBox
 Inherited
getHAlign():String
Returns the horizontal alignment (depending of the concrete class) for the box, which determines how child elements are positioned.
LayoutBox
 Inherited
getHeight():Number
Returns the pixel height of the component.
Component
 Inherited
getID():String
Returns the ID of the component, as defined in the XML.
Component
 Inherited
Returns whether the component is included in layout calculations and rendering in parent layout box.
Component
 Inherited
getIndex():int
Returns the index of this element in its parent's elements array.
Component
 Inherited
Returns the interface for the layout element that is the next sibling to this element in the parent containers's element array.
Component
 Inherited
getNodeName():String
Returns the node name of the element.
Component
 Inherited
Returns the number of children currently in the box.
LayoutBox
 Inherited
getPadding():Number
Returns the number of pixels for the border of the container.
LayoutBox
 Inherited
Returns the interface for the layout element that is the previous sibling to this element in the parent containers's element array.
Component
  
Returns the index of the currently visible child element.
ViewStack
  
Returns the ID of the selected item.
ViewStack
 Inherited
getVAlign():String
Returns the vertical alignment for the box, which determines how child elements are positioned.
LayoutBox
 Inherited
getVisible():Boolean
Returns whether the component is visible.
Component
 Inherited
getWidth():Number
Returns the pixel width of the component.
Component
 Inherited
getX(global:Boolean = false):Number
Returns the position of the component on the x axis.
Component
 Inherited
getY(global:Boolean = false):Number
Returns the position of the component on the y axis.
Component
  
insertChildAt(child:String, index:uint):Boolean
[override] Adds a new child element at the specified position in the box children array.
ViewStack
 Inherited
move(x:Number, y:Number, global:Boolean = false):void
Sets the x,y coordinates of the component.
Component
  
removeChildAt(index:uint):Boolean
[override] Removes a child element from the box children array at the specified index.
ViewStack
  
removeChildByID(id:String):Boolean
[override] Removes a child element with the specified ID from the box children array.
ViewStack
 Inherited
setAlpha(alpha:Number):void
Sets the alpha value of the component.
Component
 Inherited
setBackgroundColor(color:int):void
Sets the background color for the box.
LayoutBox
 Inherited
setBackgroundImage(image:String):void
Sets the background image for the box.
LayoutBox
 Inherited
setGutter(gutter:Number):void
Sets the number of pixels for the buffer between elements in the container.
LayoutBox
 Inherited
setHAlign(align:String):void
Sets the horizontal alignment for the box, which determines how child elements are positioned.
LayoutBox
 Inherited
setIncludeInLayout(includeInLayout:Boolean):void
Sets whether the component is included in layout calculations and rendering in parent layout box.
Component
 Inherited
setPadding(padding:Number):void
Sets the number of pixels for the border of the container.
LayoutBox
  
setSelectedIndex(index:uint):void
Toggles the visibility of the child element at the specified index.
ViewStack
  
setSelectedItemID(id:String):void
Sets the selected item based on its ID.
ViewStack
 Inherited
setSize(width:Number, height:Number):void
Sets the pixel dimensions for the wrapped component.
Component
 Inherited
setVAlign(align:String):void
Sets the vertical alignment for the box, which determines how child elements are positioned.
LayoutBox
 Inherited
setVisible(visible:Boolean):void
Sets whether the component is visible.
Component
Events
 Event Summary Defined By
 InheritedDispatched when a UI element in the player is clicked.Component
 InheritedDispatched when a UI element in the player is rolled off.Component
 InheritedDispatched when a UI element in the player is rolled over.Component
 InheritedDispatched when a property changes in a bindable component.Component
Constructor Detail
ViewStack()Constructor
public function ViewStack(element:Object)

Constructor.

Parameters
element:Object — layout element to wrap and delegate all calls to.
Method Detail
appendChild()method
override public function appendChild(child:String):Boolean

Adds a new child element to the end of the box children array.

Parameters

child:String — The BEML definition to be used by the new element.

Returns
Boolean
getSelectedIndex()method 
public function getSelectedIndex():uint

Returns the index of the currently visible child element.

Returns
uint — The index of the element that should is visible.
getSelectedItemID()method 
public function getSelectedItemID():String

Returns the ID of the selected item.

Returns
String — The ID of the selected child element.
insertChildAt()method 
override public function insertChildAt(child:String, index:uint):Boolean

Adds a new child element at the specified position in the box children array.

Parameters

child:String — The BEML definition to be used by the new element.
 
index:uint — The index position in which to insert the new element.

Returns
Boolean
removeChildAt()method 
override public function removeChildAt(index:uint):Boolean

Removes a child element from the box children array at the specified index.

Parameters

index:uint — The index position of the child element.

Returns
Boolean — True if the child was successfully removed.
removeChildByID()method 
override public function removeChildByID(id:String):Boolean

Removes a child element with the specified ID from the box children array.

Parameters

id:String — The ID of the child element.

Returns
Boolean — True if the child was successfully removed.
setSelectedIndex()method 
public function setSelectedIndex(index:uint):void

Toggles the visibility of the child element at the specified index.

Parameters

index:uint — The index of the element that should be visible.

setSelectedItemID()method 
public function setSelectedItemID(id:String):void

Sets the selected item based on its ID.

Parameters

id:String — The ID of the child element to select.