Package | com.gestureworks.cml.elements |
Class | public class Media |
Inheritance | Media ![]() ![]() |
See also
Property | Defined By | ||
---|---|---|---|
autoplay : Boolean
Indicates whether the file plays upon load
| Media | ||
![]() | autoShuffle : Boolean
autoshuffles
| TouchContainer | |
![]() | childList : ChildList
Returns the object's childList. | TouchContainer | |
![]() | 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 | |
current : * [read-only]
Returns a reference to the current media object
| Media | ||
![]() | 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 media height
| Media | ||
![]() | heightPercent : Number
sets the height of the container
| TouchContainer | |
![]() | id : String
Returns the object's id. | TouchContainer | |
![]() | layout : *
specifies the type of layout
| TouchContainer | |
![]() | layoutList : Dictionary | TouchContainer | |
loop : Boolean
Indicates whether the media will re-play when it has reached the end
| Media | ||
![]() | 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 | |
resample : Boolean
Specifies whether a loaded image is resampled to the provided width and/or height. | Media | ||
![]() | sound : String | TouchContainer | |
src : String
Sets the media file source
| Media | ||
![]() | state : Dictionary | TouchContainer | |
![]() | stateId : *
Returns the current state id. | TouchContainer | |
![]() | toBitmap : Boolean | TouchContainer | |
width : Number [override]
Sets media width
| Media | ||
![]() | widthPercent : Number
sets the width of the container
| TouchContainer |
Method | Defined By | ||
---|---|---|---|
Media()
Constructor
| Media | ||
![]() | 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 currently open media file
| Media | ||
dispose():void [override]
Dispose method
| Media | ||
![]() | 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
| Media | ||
![]() | loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number. | TouchContainer | |
![]() | makeGestureList(value:XMLList):Object
Creates gestureList object from XML
| TouchContainer | |
open(file:String):void
Opens the file specified in the argument
| Media | ||
![]() | parseCML(cml:XMLList):XMLList
Parse cml for local layouts. | TouchContainer | |
pause():void
Pauses media playback
| Media | ||
play():void
Plays the media file from the beginning
| Media | ||
![]() | 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
Resumes media playback from paused position
| Media | ||
![]() | 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(offset:Number):void
Sets the media playhead position
| Media | ||
![]() | setDimensionsToChild():void
method sets the dimensions of each child
| TouchContainer | |
stop():void
Pauses the media file and returns to the playhead to the beginning
| Media | ||
![]() | 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
Indicates whether the file plays upon load
The default value is false
.
public function get autoplay():Boolean
public function set autoplay(value:Boolean):void
current | property |
current:*
[read-only] Returns a reference to the current media object
The default value is null
.
public function get current():*
height | property |
height:Number
[override] Sets media height
The default value is 0
.
public function get height():Number
public function set height(value:Number):void
loop | property |
loop:Boolean
Indicates whether the media will re-play when it has reached the end
The default value is false
.
public function get loop():Boolean
public function set loop(value:Boolean):void
resample | property |
resample:Boolean
Specifies whether a loaded image is resampled to the provided width and/or height. In order for resampling to work, this must be set to true, and a width and/or height must be set prior to calling open.
The default value is false
.
public function get resample():Boolean
public function set resample(value:Boolean):void
src | property |
src:String
Sets the media file source
The default value is null
.
public function get src():String
public function set src(value:String):void
width | property |
width:Number
[override] Sets media width
The default value is 0
.
public function get width():Number
public function set width(value:Number):void
Media | () | Constructor |
public function Media()
Constructor
close | () | method |
public function close():void
Closes the currently open media file
dispose | () | method |
override public function dispose():void
Dispose method
init | () | method |
override public function init():void
Initialisation method
open | () | method |
public function open(file:String):void
Opens the file specified in the argument
Parameters
file:String |
pause | () | method |
public function pause():void
Pauses media playback
play | () | method |
public function play():void
Plays the media file from the beginning
resume | () | method |
public function resume():void
Resumes media playback from paused position
seek | () | method |
public function seek(offset:Number):void
Sets the media playhead position
Parameters
offset:Number |
stop | () | method |
public function stop():void
Pauses the media file and returns to the playhead to the beginning