Packagekm.components
Classpublic class PlaylistCreator
InheritancePlaylistCreator Inheritance flash.events.EventDispatcher

The PlaylistCreator class.
The PlaylistCreator class is a helper class for the MediaPlayer component class that allows for an easy way to set a YouTube or Picasa playlist.


Example
import km.components.*;
import km.skins.*;

var mp:MediaPlayer = new MediaPlayer();
ScriptedSkin.applyTo(mp);
mp.setSize(300, 200);
mp.move(20, 20);
addChild(mp);

var pc:PlaylistCreator = new PlaylistCreator();
pc.player = mp;

pc.service = PlaylistCreator.PICASA;
pc.tag = 'flower';
pc.update();



Public Properties
 PropertyDefined by
  album : String
[write-only] Album (=album id) setting for the service query [Picasa].
PlaylistCreator
  category : String
[write-only] Category setting for the service query [YouTube].
PlaylistCreator
  itime : int = 6
Item 'itime' setting [Picasa].
PlaylistCreator
  kind : String
[write-only] Kind setting for the service query [Picasa].
PlaylistCreator
  max_results : int
[write-only] Max results for the service query (the absolute maximum is 50).
PlaylistCreator
  orderby : String
[write-only] Order by setting for the service query [YouTube].
PlaylistCreator
  pause : String = "false"
Playlist 'pause' setting.
PlaylistCreator
  player : MediaPlayer
The media player instance yo use.
PlaylistCreator
  q : String
[write-only] Q (=query) setting for the service query.
PlaylistCreator
  repeat : Boolean = true
Playlist 'repeat' setting.
PlaylistCreator
  results : int
[read-only] The actual amount of results ignoring the max_results setting.
This can be read after the complete event has been broadcasted.
PlaylistCreator
  scalemode : int = 0
Item 'scalemode' setting [Picasa].
PlaylistCreator
  service : int
[write-only] Service to use.
All query related settings are reset when the service is set.
PlaylistCreator
  shuffle : Boolean = false
Playlist 'shuffle' setting.
PlaylistCreator
  start : int = 0
Playlist 'start' setting.
PlaylistCreator
  start_index : int
[write-only] Start index setting for the service query.
PlaylistCreator
  tag : String
[write-only] Tag setting for the service query [Picasa].
PlaylistCreator
  tid : uint = 0x10
Item 'tid' setting [Picasa].
PlaylistCreator
  time : String
[write-only] Time setting for the service query [YouTube].
PlaylistCreator
  ttime : int = 1
Item 'ttime' setting [Picasa].
PlaylistCreator
  user : String
[write-only] User setting for the service query.
For the Picasa service this is the UserID, for the YouTube service this is the Author.
PlaylistCreator
  ytlink : Boolean = true
Playlist 'ytlink' setting [YouTube].
PlaylistCreator
Public Methods
 MethodDefined by
  
PlaylistCreator
  
update():void
Updates the playlist of the assigned player instance based on the current settings.
PlaylistCreator
Events
 EventSummaryDefined by
   The complete event is broadcasted when the update procedure has been completed after calling the update() method.PlaylistCreator
   The empty event is broadcasted when the update procedure has resulted in an empty playlist.PlaylistCreator
Public Constants
 ConstantDefined by
  PICASA : int = 1
[static]
PlaylistCreator
  YOUTUBE : int = 0
[static]
PlaylistCreator
Property detail
albumproperty
album:String  [write-only]

Album (=album id) setting for the service query [Picasa].

Implementation
    public function set album(value:String):void
categoryproperty 
category:String  [write-only]

Category setting for the service query [YouTube].

Implementation
    public function set category(value:String):void
itimeproperty 
public var itime:int = 6

Item 'itime' setting [Picasa].

kindproperty 
kind:String  [write-only]

Kind setting for the service query [Picasa].

Implementation
    public function set kind(value:String):void
max_resultsproperty 
max_results:int  [write-only]

Max results for the service query (the absolute maximum is 50).

Implementation
    public function set max_results(value:int):void
orderbyproperty 
orderby:String  [write-only]

Order by setting for the service query [YouTube].

Implementation
    public function set orderby(value:String):void
pauseproperty 
public var pause:String = "false"

Playlist 'pause' setting.

playerproperty 
public var player:MediaPlayer

The media player instance yo use.

qproperty 
q:String  [write-only]

Q (=query) setting for the service query.

Implementation
    public function set q(value:String):void
repeatproperty 
public var repeat:Boolean = true

Playlist 'repeat' setting.

resultsproperty 
results:int  [read-only]

The actual amount of results ignoring the max_results setting.
This can be read after the complete event has been broadcasted.

Implementation
    public function get results():int
scalemodeproperty 
public var scalemode:int = 0

Item 'scalemode' setting [Picasa].

serviceproperty 
service:int  [write-only]

Service to use.
All query related settings are reset when the service is set.

Implementation
    public function set service(value:int):void
shuffleproperty 
public var shuffle:Boolean = false

Playlist 'shuffle' setting.

startproperty 
public var start:int = 0

Playlist 'start' setting.

start_indexproperty 
start_index:int  [write-only]

Start index setting for the service query.

Implementation
    public function set start_index(value:int):void
tagproperty 
tag:String  [write-only]

Tag setting for the service query [Picasa].

Implementation
    public function set tag(value:String):void
tidproperty 
public var tid:uint = 0x10

Item 'tid' setting [Picasa].

timeproperty 
time:String  [write-only]

Time setting for the service query [YouTube].

Implementation
    public function set time(value:String):void
ttimeproperty 
public var ttime:int = 1

Item 'ttime' setting [Picasa].

userproperty 
user:String  [write-only]

User setting for the service query.
For the Picasa service this is the UserID, for the YouTube service this is the Author.

Implementation
    public function set user(value:String):void
ytlinkproperty 
public var ytlink:Boolean = true

Playlist 'ytlink' setting [YouTube].

Constructor detail
PlaylistCreator()constructor
public function PlaylistCreator()
Method detail
update()method
public function update():void

Updates the playlist of the assigned player instance based on the current settings.

Event detail
completeevent 
Event object type: flash.events.Event

The complete event is broadcasted when the update procedure has been completed after calling the update() method.

emptyevent  
Event object type: flash.events.Event

The empty event is broadcasted when the update procedure has resulted in an empty playlist.

Constant detail
PICASAconstant
public static const PICASA:int = 1
YOUTUBEconstant 
public static const YOUTUBE:int = 0