Package | net.FlashDen.ourben |
Class | public class MP3PlusHelper |
"$artist - $title" creates "Artist Name - Song Title"
"$title [$length]" creates "Song Title [02:32]"
Token |
Definition |
MP3 |
IceCast/ShoutCast |
$artist | Artist | usually |
usually |
$title | Title | usually |
usually |
$album | Album | usually |
sometimes |
$comment | Comment | Sometimes |
sometimes |
$genre | Genre | usually |
usually |
$track | Track Number | sometimes |
rare |
$year | Copyright Year | sometimes |
|
$resource | Resource URL | always |
always |
$icy_url | Related URL | usually |
|
$tlen | Length (ms) | usually |
|
$length | Length (hh:MM:ss) | usually |
|
$id3version | ID3 Version | usually |
Method | Defined by | ||
---|---|---|---|
FormatPlaylist(player:MP3Plus, format:String):Array
[static]
Returns a custom formatted version of an MP3Plus playlist.
| MP3PlusHelper | ||
LinkBuffer(mp3player:MP3Plus, bufferExposer:*):Boolean
[static]
Binds buffer information to objects exposing .buffering:Boolean, .loadedbytes:int, .totalbytes:int and .mslookahead:int .
| MP3PlusHelper | ||
LinkButtons(mp3player:MP3Plus, play:* = null, pause:* = null, stop:* = null, back:* = null, next:* = null, mute:* = null, fadeout:* = null, shuffle:* = null, repeatone:* = null, repeatall:* = null):void
[static]
Binds playback controls to UI objects.
| MP3PlusHelper | ||
LinkMetaImage(mp3player:MP3Plus, loadBytesExposer:*, pattern:*):Boolean
[static]
Binds media metadata to objects exposing .loadBytes(bytes:ByteArray):void .
| MP3PlusHelper | ||
LinkMetaText(mp3player:MP3Plus, textExposer:String, format:*):Boolean
[static]
Binds media metadata to objects exposing .text:String .
| MP3PlusHelper | ||
LinkPlaylist(mp3player:MP3Plus, selectExposer:String, format:*):Boolean
[static]
Binds formatted playlists to objects exposing .select(i:int):void and a writeable .items:Array .
| MP3PlusHelper | ||
LinkPosition(mp3player:MP3Plus, positionExposer:*):Boolean
[static]
Binds playback position to objects exposing .position:int, .requestPosition:int, .maximum:int and .live:Boolean .
| MP3PlusHelper | ||
LinkVolume(mp3player:MP3Plus, volumeExposer:*):Boolean
[static]
Binds volume control to objects exposing .volume:Number(>= 0.0 <= 1.0) .
| MP3PlusHelper |
FormatPlaylist | () | method |
public static function FormatPlaylist(player:MP3Plus, format:String):Array
Returns a custom formatted version of an MP3Plus playlist.
player:MP3Plus — The MP3Plus whose playlist will be formatted.
|
|
format:String — The metadata format string, see Formatting metadata strings.
|
Array — An Array of String safe objects (Array<{string:String, owner:XML, toString:{return string}}>)
|
See also
LinkBuffer | () | method |
public static function LinkBuffer(mp3player:MP3Plus, bufferExposer:*):Boolean
Binds buffer information to objects exposing .buffering:Boolean, .loadedbytes:int, .totalbytes:int and .mslookahead:int .
public class BufferExposer [extends] [implements] { public set buffering(buffering:Boolean):ignored { [...] } public set loadedBytes(loadedBytes:int):ignored { [...] } public set totalBytes(totalBytes:int):ignored { [...] } public set mslookahead(mslookahead:int):ignored { [...] } }
var BufferExposer:Object = { buffering:Boolean, loadedBytes:int, totalBytes:int, mslookahead:int [...] };
mp3player:MP3Plus — The MP3Plus instance to link with.
|
|
bufferExposer:* — Any object which exposes .buffering:Boolean, .loadedbytes:int, .totalbytes:int and .mslookahead:int
|
Boolean — true or false signifying a successful binding to the render objects members.
|
LinkButtons | () | method |
public static function LinkButtons(mp3player:MP3Plus, play:* = null, pause:* = null, stop:* = null, back:* = null, next:* = null, mute:* = null, fadeout:* = null, shuffle:* = null, repeatone:* = null, repeatall:* = null):void
Binds playback controls to UI objects.
mp3player:MP3Plus — The MP3Plus instance to link with.
|
||||||||||||||||||||||||||||||||||
play:* (default = null ) — An object that can dispatch MouseEvent.CLICK
|
||||||||||||||||||||||||||||||||||
pause:* (default = null ) — An object that can dispatch MouseEvent.CLICK
|
||||||||||||||||||||||||||||||||||
stop:* (default = null ) — An object that can dispatch MouseEvent.CLICK
|
||||||||||||||||||||||||||||||||||
back:* (default = null ) — An object that can dispatch MouseEvent.CLICK
|
||||||||||||||||||||||||||||||||||
next:* (default = null ) — An object that can dispatch MouseEvent.CLICK
|
||||||||||||||||||||||||||||||||||
mute:* (default = null ) — An object that can dispatch MouseEvent.CLICK
|
||||||||||||||||||||||||||||||||||
fadeout:* (default = null ) — An object that can dispatch MouseEvent.CLICK
|
||||||||||||||||||||||||||||||||||
shuffle:* (default = null ) — An object that can dispatch MouseEvent.CLICK
|
||||||||||||||||||||||||||||||||||
repeatone:* (default = null ) — An object that can dispatch MouseEvent.CLICK
|
||||||||||||||||||||||||||||||||||
repeatall:* (default = null ) — An object that can dispatch MouseEvent.CLICK
Developers can use existing Sprite, MovieClip, Graphic and numerous other types that can dispatch mouse events as buttons (play, pause... repeatall). Buttons cannot be decoupled only reassigned. The default null properties are ignored and do remove linkage. As well as supporting any object that dispatchs MouseEvent.CLICK, some button objects may also feature toggle states:
Toggling is performed on any UI object that exposes a Boolean property armed UI objects do not need to expose armed if a project doesn't require that feature, MP3PlusHelper will check whether objects expose armed before attempting to set it. |
public class ButtonClass extends Sprite { // expose public armed:Boolean property public function set armed(value:Boolean) { if (value) showPausedGraphic(); else showDefaultGraphic(); } ... }
LinkMetaImage | () | method |
public static function LinkMetaImage(mp3player:MP3Plus, loadBytesExposer:*, pattern:*):Boolean
Binds media metadata to objects exposing .loadBytes(bytes:ByteArray):void .
public class LoadBytesExposer [extends] [implements] { public function loadBytes(bytes:ByteArray):ignored { [...] } }
var LoadBytesExposer:Object = { loadBytes:function(bytes:ByteArray):ignored [...] };
mp3player:MP3Plus — The MP3Plus instance to link with.
|
|
loadBytesExposer:* — Any object which exposes .loadBytes(bytes:ByteArray):void
|
|
pattern:* — The String or RegExp used to match against ID3Info.pictures[].picturetype
|
Boolean — true or false signifying a successful binding to the render objects members.
|
LinkMetaText | () | method |
public static function LinkMetaText(mp3player:MP3Plus, textExposer:String, format:*):Boolean
Binds media metadata to objects exposing .text:String .
public class MetaTextExposer [extends] [implements] { public set text(string:String):ignored { [...] } }
var MetaTextExposer:Object = { text:String [...] };
mp3player:MP3Plus — The MP3Plus instance to link with.
|
|
textExposer:String — Any object which exposes a writable .text:String
|
|
format:* — The metadata format string, see Formatting metadata strings.
|
Boolean — true or false signifying a successful binding to the render objects members.
|
LinkPlaylist | () | method |
public static function LinkPlaylist(mp3player:MP3Plus, selectExposer:String, format:*):Boolean
Binds formatted playlists to objects exposing .select(i:int):void and a writeable .items:Array .
public class PlaylistExposer [extends] [implements] { public function select(index:int):ignored { [...] } public set items(array:Array):ignored { [...] } }
var PlaylistExposer:Object = { items:Array, select:function(index:int):ignored [...] };
{ string:String, owner:XML, toString:function(){ return string; } }
for each(var item:Object in items) { // output formatted metadata trace(item); // output formatted metadata trace(item.string); // output all metadata XML trace(item.owner.toXMLString()); }
mp3player:MP3Plus — The MP3Plus instance to link with.
|
|
selectExposer:String — Any object which exposes .select(i:int):void and a writeable .items:Array
|
|
format:* — The metadata format string, see Formatting metadata strings.
|
Boolean — true or false signifying a successful binding to the render objects members.
|
LinkPosition | () | method |
public static function LinkPosition(mp3player:MP3Plus, positionExposer:*):Boolean
Binds playback position to objects exposing .position:int, .requestPosition:int, .maximum:int and .live:Boolean .
public class PositionExposer [extends] [implements] { public set position(position:int):ignored { [...] } public get requestPosition():int { // when no tracking occured return -1; // when tracking has occured return [int >= 0]; } public set requestPosition(requestPosition:int):ignored { [...] } public set maximum(maximum:int):ignored { [...] } public set live(live:Boolean):ignored { [...] }
var PositionExposer:Object = { position:int, requestPosition:int, maximum:int, live:Boolean };
mp3player:MP3Plus — The MP3Plus instance to link with.
|
|
positionExposer:* — Any object which exposes .position:int, .requestPosition:int, .maximum:int and .live:Boolean
|
Boolean — true or false signifying a successful binding to the render objects members.
|
// track bar logic ... [drag logic] ... // track bar handle mouseup event myButton.addEventListener(MouseEvent.MOUSEUP, updatePosition); private function updatePosition(e:MouseEvent):void { // set requestPosition requestPosition = (maximum / width) myButton.y; }
LinkVolume | () | method |
public static function LinkVolume(mp3player:MP3Plus, volumeExposer:*):Boolean
Binds volume control to objects exposing .volume:Number(>= 0.0 <= 1.0) .
public class VolumeExposer [extends] [implements] { public get volume():Number(>= 0.0 <= 1.0) { [...] } }
var VolumeExposer:Object = { volume:Number(>= 0.0 <= 1.0) [...] };
mp3player:MP3Plus — The MP3Plus instance to link with.
|
|
volumeExposer:* — Any object which exposes .volume:Number(>= 0.0 <= 1.0)
|
Boolean — true or false signifying a successful binding to the render objects members.
|