Package | cv.data |
Class | public dynamic class PlayList |
Implements | flash.events.IEventDispatcher |
Subclasses | ASX, ATOM, B4S, M3U, PLS, XSPF |
Property | Defined by | ||
---|---|---|---|
index : uint
Gets or sets the current selected item in the playlist.
| PlayList | ||
nextIndex : int [read-only]
Gets the index of the next item in the playlist.
| PlayList | ||
previousIndex : int [read-only]
Gets the index of the previous item in the playlist.
| PlayList | ||
repeat : Boolean
Gets or sets whether an item is repeated after it's finished.
| PlayList | ||
repeatAll : Boolean
Gets or sets whether the playlist repeats when it's finished.
| PlayList | ||
shuffle : Boolean
Gets or sets whether shuffle is enabled or not.
| PlayList |
Method | Defined by | ||
---|---|---|---|
PlayList(dp:DataProvider = null)
| PlayList | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event.
| PlayList | ||
dispatchEvent(evt:Event):Boolean
Dispatches an event into the event flow.
| PlayList | ||
getCurrent():Object
Returns the current item from the playlist
| PlayList | ||
getNext():Object
Returns the next item from the playlist.
| PlayList | ||
getPrevious():Object
Returns the previous item from the playlist.
| PlayList | ||
getRandom():Object
Returns a random item from the playlist.
| PlayList | ||
getRandomIndex():uint
Returns a random index from the playlist.
| PlayList | ||
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event.
| PlayList | ||
inPlayList(item:Object):Boolean
Searchs the playlist to determin if an item is listed.
| PlayList | ||
remove(item:Object):Boolean
Removes the given item from the playlist.
| PlayList | ||
removeAt(idx:uint):Boolean
Removes an item at a given index.
| PlayList | ||
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
| PlayList | ||
Converts the PlayList to a DataProvider for use
with components.
| PlayList | ||
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type.
| PlayList |
Method | Defined by | ||
---|---|---|---|
setMimes():void
Sets the mimetypes allowed by PlayList.
| PlayList | ||
toSeconds(str:String):int
Converts a string version of a time format into the seconds equivalent.
| PlayList |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched when the index has changed or getNext() and getPrevious() were called. | PlayList | |||
Dispatched when the playlist has reached the end of the playlist. | PlayList | |||
Dispatched when the playlist has started playing the first item. | PlayList |
Constant | Defined by | ||
---|---|---|---|
CHANGE : String = "change" [static]
The
PlayList.CHANGE constant defines the value of
the type property of the event object that is dispatched to indicate that
the playlist has changed in some way. | PlayList | ||
END_OF_LIST : String = "endoflist" [static]
The
PlayList.END_OF_LIST constant defines the value of
the type property of the event object that is dispatched to indicate that
the playlist has reached the end of the list. | PlayList | ||
START_OF_LIST : String = "startoflist" [static]
The
PlayList.START_OF_LIST constant defines the value of
the type property of the event object that is dispatched to indicate that
the playlist has reached the beginning of the list. | PlayList |
index | property |
index:uint
[read-write]Gets or sets the current selected item in the playlist.
The default value is 0
.
public function get index():uint
public function set index(value:uint):void
See also
nextIndex | property |
nextIndex:int
[read-only]Gets the index of the next item in the playlist.
Implementation public function get nextIndex():int
See also
previousIndex | property |
previousIndex:int
[read-only]Gets the index of the previous item in the playlist.
Implementation public function get previousIndex():int
See also
repeat | property |
repeat:Boolean
[read-write]Gets or sets whether an item is repeated after it's finished.
The default value is false
.
public function get repeat():Boolean
public function set repeat(value:Boolean):void
repeatAll | property |
repeatAll:Boolean
[read-write]Gets or sets whether the playlist repeats when it's finished.
The default value is false
.
public function get repeatAll():Boolean
public function set repeatAll(value:Boolean):void
shuffle | property |
shuffle:Boolean
[read-write]Gets or sets whether shuffle is enabled or not.
The default value is false
.
public function get shuffle():Boolean
public function set shuffle(value:Boolean):void
PlayList | () | constructor |
addEventListener | () | method |
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. You can register event listeners on all nodes in the display list for a specific type of event, phase, and priority.
Parameterstype:String — |
|
listener:Function — |
|
useCapture:Boolean (default = false ) — |
|
priority:int (default = 0 ) — |
|
useWeakReference:Boolean (default = false ) — |
dispatchEvent | () | method |
public function dispatchEvent(evt:Event):Boolean
Dispatches an event into the event flow. The event target is the EventDispatcher object upon which the dispatchEvent() method is called.
Parametersevt:Event — |
Boolean — |
getCurrent | () | method |
public function getCurrent():Object
Returns the current item from the playlist
ReturnsObject — |
getNext | () | method |
public function getNext():Object
Returns the next item from the playlist.
ReturnsObject — |
See also
getPrevious | () | method |
public function getPrevious():Object
Returns the previous item from the playlist.
ReturnsObject — |
See also
getRandom | () | method |
public function getRandom():Object
Returns a random item from the playlist.
ReturnsObject — |
See also
getRandomIndex | () | method |
public function getRandomIndex():uint
Returns a random index from the playlist.
Returnsuint — |
See also
hasEventListener | () | method |
public function hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event. This allows you to determine where an EventDispatcher object has altered handling of an event type in the event flow hierarchy. To determine whether a specific event type actually triggers an event listener, use willTrigger().
Parameterstype:String — |
Boolean — |
inPlayList | () | method |
public function inPlayList(item:Object):Boolean
Searchs the playlist to determin if an item is listed.
Parametersitem:Object — |
Boolean — |
remove | () | method |
public function remove(item:Object):Boolean
Removes the given item from the playlist.
Parametersitem:Object — |
Boolean — |
removeAt | () | method |
public function removeAt(idx:uint):Boolean
Removes an item at a given index.
Parametersidx:uint — |
Boolean — |
removeEventListener | () | method |
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object. If there is no matching listener registered with the EventDispatcher object, a call to this method has no effect.
Parameterstype:String — |
|
listener:Function — |
|
useCapture:Boolean (default = false ) — |
setMimes | () | method |
protected function setMimes():void
Sets the mimetypes allowed by PlayList.
toDataProvider | () | method |
public function toDataProvider():DataProvider
Converts the PlayList to a DataProvider for use with components.
ReturnsDataProvider —
The DataProvider equivalent of the playlist.
|
toSeconds | () | method |
protected function toSeconds(str:String):int
Converts a string version of a time format into the seconds equivalent.
Parametersstr:String — |
int — |
willTrigger | () | method |
public function willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. This method returns true if an event listener is triggered during any phase of the event flow when an event of the specified type is dispatched to this EventDispatcher object or any of its descendants.
Parameterstype:String — |
Boolean — |
change | event |
flash.events.Event
Dispatched when the index has changed or getNext()
and getPrevious()
were called.
See also
endoflist | event |
flash.events.Event
Dispatched when the playlist has reached the end of the playlist.
See also
startoflist | event |
flash.events.Event
Dispatched when the playlist has started playing the first item.
See also
CHANGE | constant |
public static const CHANGE:String = "change"
The PlayList.CHANGE
constant defines the value of
the type
property of the event object that is dispatched to indicate that
the playlist has changed in some way.
END_OF_LIST | constant |
public static const END_OF_LIST:String = "endoflist"
The PlayList.END_OF_LIST
constant defines the value of
the type
property of the event object that is dispatched to indicate that
the playlist has reached the end of the list.
START_OF_LIST | constant |
public static const START_OF_LIST:String = "startoflist"
The PlayList.START_OF_LIST
constant defines the value of
the type
property of the event object that is dispatched to indicate that
the playlist has reached the beginning of the list.