Package | com.gestureworks.cml.elements |
Class | public class YouTube |
Inheritance | YouTube ![]() ![]() |
The Video ID is the 10-digit ID associated with the video link. For example, a direct URL to the video used in this example is: http://www.youtube.com/watch?v=h0MZX-D8xzA. Notice the "h0MZX-D8xzA" is the video's id. A video must be set to allow embedding from its owner to be used by the YouTube API. If you receive "Error 100" or "Error 101", or "150", the video either no longer exists, or its embedding has been disabled.
var ytElement:YouTubeElement = new YouTubeElement(); ytElement.src = "h0MZX-D8xzA"; ytElement.autoplay = true; ytElement.chrome = true; addChild(ytElement); ytElement.init();
Property | Defined By | ||
---|---|---|---|
autoplay : Boolean
Sets whether or not the video plays immediately. | YouTube | ||
![]() | autoShuffle : Boolean
autoshuffles
| TouchContainer | |
![]() | childList : ChildList
Returns the object's childList. | TouchContainer | |
chrome : Boolean
Sets whether or not to use the chromed (player with buttons) or not. | YouTube | ||
![]() | className : String
sets the class name of displayobject
| TouchContainer | |
![]() | cloneExclusions : Vector.<String> [read-only]
Returns a list of properties to exclude when cloning this object
| TouchContainer | |
![]() | cmlIndex : int
Returns the index created by the CML parser. | TouchContainer | |
![]() | dimensionsTo : Object
Sets the dimensions of TouchContainer to given object
| TouchContainer | |
![]() | dropShadow : Boolean
Sets the drop shadow effect
| TouchContainer | |
![]() | group : String | TouchContainer | |
height : Number [override]
Sets the video height. | YouTube | ||
![]() | heightPercent : Number
sets the height of the container
| TouchContainer | |
![]() | id : String
Returns the object's id. | TouchContainer | |
isPlaying : Boolean [read-only] | YouTube | ||
![]() | layout : *
specifies the type of layout
| TouchContainer | |
![]() | layoutList : Dictionary | TouchContainer | |
loaded : Boolean [read-only] | YouTube | ||
![]() | mouseChildren : Boolean [override]
sets the mousechildren value to true or false. | TouchContainer | |
![]() | paddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area. | TouchContainer | |
![]() | paddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area. | TouchContainer | |
![]() | paddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area. | TouchContainer | |
![]() | paddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area. | TouchContainer | |
![]() | position : *
Sets the position
| TouchContainer | |
![]() | relativeX : Boolean
When set true this containers children's x position will be laid out relatively
to each other. | TouchContainer | |
![]() | relativeY : Boolean
When set true this containers children's y position will be laid out relatively
to each other. | TouchContainer | |
![]() | sound : String | TouchContainer | |
src : String
Sets the video ID to be loaded. | YouTube | ||
![]() | state : Dictionary | TouchContainer | |
![]() | stateId : *
Returns the current state id. | TouchContainer | |
![]() | toBitmap : Boolean | TouchContainer | |
width : Number [override]
Sets the video width. | YouTube | ||
![]() | widthPercent : Number
sets the width of the container
| TouchContainer |
Method | Defined By | ||
---|---|---|---|
YouTube()
Constructor
| YouTube | ||
![]() | activateTouch():void | TouchContainer | |
![]() | addAllChildren():void
method searches the child and adds to the list
| TouchContainer | |
![]() | addChild(child:DisplayObject):DisplayObject [override]
Adds child to display list and, if not already added, the child list
| TouchContainer | |
![]() | addChildAt(child:DisplayObject, index:int):DisplayObject [override]
Adds child to display list and, if not already added, the child list
| TouchContainer | |
![]() | applyLayout(value:* = null):void
Apply the containers layout
| TouchContainer | |
![]() | childToList(id:String, child:*):void
child appended to the childlist
| TouchContainer | |
![]() | clone():*
Clone method
| TouchContainer | |
close():void
closes the video
| YouTube | ||
dispose():void [override]
Destructor
| YouTube | ||
![]() | getElementById(id:String):*
Searches CML childList by id. | TouchContainer | |
![]() | getElementsByClassName(className:String):Array
Searches the CML childList by className. | TouchContainer | |
![]() | getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class. | TouchContainer | |
init():void [override]
Initialisation method
| YouTube | ||
![]() | loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number. | TouchContainer | |
![]() | makeGestureList(value:XMLList):Object
Creates gestureList object from XML
| TouchContainer | |
![]() | parseCML(cml:XMLList):XMLList
Parse cml for local layouts. | TouchContainer | |
pause():void
pauses the video
| YouTube | ||
play():void
Start playing from the beginning. | YouTube | ||
![]() | postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine. | TouchContainer | |
![]() | querySelector(selector:String):*
Searches the CML childList by selector. | TouchContainer | |
![]() | querySelectorAll(selector:*):Array
Search the CML childList by selector. | TouchContainer | |
![]() | removeChild(child:DisplayObject):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildAt(index:int):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void [override]
Removes children from display list and, if not already removed, the child list
| TouchContainer | |
resume():void
Resume from last spot. | YouTube | ||
![]() | saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number. | TouchContainer | |
![]() | searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists. | TouchContainer | |
seek(value:Number, seekAhead:Boolean):void
seek
| YouTube | ||
![]() | setDimensionsToChild():void
method sets the dimensions of each child
| TouchContainer | |
stop():void
stops the video
| YouTube | ||
![]() | tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index. | TouchContainer | |
![]() | updatePadding():void
Updates child padding within this container
| TouchContainer | |
![]() | updatePercentDim():void
Updates child percent dimensions within this container
| TouchContainer | |
![]() | updateProperties(state:* = 0):void
Updates properties from state. | TouchContainer | |
![]() | updateRelativePos():void
Updates child relative positions within this container
| TouchContainer |
autoplay | property |
autoplay:Boolean
Sets whether or not the video plays immediately. Note: the player does not start loading the FLV it requests until a call to play the video, or seek to the video is called.
The default value is false;
.
public function get autoplay():Boolean
public function set autoplay(value:Boolean):void
chrome | property |
chrome:Boolean
Sets whether or not to use the chromed (player with buttons) or not.
The default value is false
.
public function get chrome():Boolean
public function set chrome(value:Boolean):void
height | property |
height:Number
[override] Sets the video height.
The default value is 360
.
public function get height():Number
public function set height(value:Number):void
isPlaying | property |
isPlaying:Boolean
[read-only] public function get isPlaying():Boolean
loaded | property |
loaded:Boolean
[read-only] public function get loaded():Boolean
src | property |
src:String
Sets the video ID to be loaded. Must be present or the element will crash.
public function get src():String
public function set src(value:String):void
width | property |
width:Number
[override] Sets the video width.
The default value is 480
.
public function get width():Number
public function set width(value:Number):void
YouTube | () | Constructor |
public function YouTube()
Constructor
close | () | method |
public function close():void
closes the video
dispose | () | method |
override public function dispose():void
Destructor
init | () | method |
override public function init():void
Initialisation method
pause | () | method |
public function pause():void
pauses the video
play | () | method |
public function play():void
Start playing from the beginning.
resume | () | method |
public function resume():void
Resume from last spot.
seek | () | method |
public function seek(value:Number, seekAhead:Boolean):void
seek
Parameters
value:Number | |
seekAhead:Boolean |
stop | () | method |
public function stop():void
stops the video