| Package | org.si.sion.utils.soundloader |
| Class | public class SoundLoader |
| Inheritance | SoundLoader flash.events.EventDispatcher |
See also
| Property | Defined By | ||
|---|---|---|---|
| bytesLoaded : Number [read-only] file size currently loaded | SoundLoader | ||
| bytesTotal : Number [read-only] total file size when complete all loadings. | SoundLoader | ||
| hash : * [read-only] Object to access all Sound instances. | SoundLoader | ||
| loadedFileCount : int [read-only] loaded file count | SoundLoader | ||
| loadImgFileAsSoundFont : Boolean true to load 'swf' and 'png' type file as 'ssf' and 'ssfpng' | SoundLoader | ||
| loadingFileCount : int [read-only] loading file count, this number is decreased when the file is loaded. | SoundLoader | ||
| loadMP3FileAsBinary : Boolean true to load 'mp3' type file as 'mp3bin' | SoundLoader | ||
| rememberHistory : Boolean true to check ID confirictoin | SoundLoader | ||
| Property | Defined By | ||
|---|---|---|---|
| _bytesLoaded : int loaded file size | SoundLoader | ||
| _bytesTotal : Number total file size | SoundLoader | ||
| _errorFileCount : int error file count | SoundLoader | ||
| _loaded : * loaded sounds | SoundLoader | ||
| _loadedFileCount : int loaded file count | SoundLoader | ||
| _loadedFileData : * loaded file data | SoundLoader | ||
| _loadImgFileAsSoundFont : Boolean true to load 'swf' and 'png' type file as 'ssf' and 'ssfpng' | SoundLoader | ||
| _loadingFileCount : int loading file count | SoundLoader | ||
| _loadMP3FileAsBinary : Boolean true to load 'mp3' type file as 'mp3bin' | SoundLoader | ||
| _preserveList : Vector.<SoundLoaderFileData> loading url list | SoundLoader | ||
| _rememberHistory : Boolean true to remember history | SoundLoader | ||
| Method | Defined By | ||
|---|---|---|---|
SoundLoader(eventPriority:int = 0, loadImgFileAsSoundFont:Boolean = false, loadMP3FileAsBinary:Boolean = false, rememberHistory:Boolean = false) Constructor. | SoundLoader | ||
loadAll():int load all files specifed by SoundLoder.setURL()
| SoundLoader | ||
setByteArrayImage(byteArray:ByteArray, id:String):SoundLoaderFileData ByteArray convert to Loader (image and swf)
| SoundLoader | ||
setByteArraySound(byteArray:ByteArray, id:String):SoundLoaderFileData ByteArray convert to Sound
| SoundLoader | ||
setURL(urlRequest:URLRequest, id:String = null, type:String = null, checkPolicyFile:Boolean = false):SoundLoaderFileData set loading file's urls. | SoundLoader | ||
toString():String [override] output loaded file information | SoundLoader | ||
| _bytesLoaded | property |
protected var _bytesLoaded:intloaded file size
| _bytesTotal | property |
protected var _bytesTotal:Numbertotal file size
| _errorFileCount | property |
protected var _errorFileCount:interror file count
| _loaded | property |
protected var _loaded:*loaded sounds
| _loadedFileCount | property |
protected var _loadedFileCount:intloaded file count
| _loadedFileData | property |
protected var _loadedFileData:*loaded file data
| _loadImgFileAsSoundFont | property |
protected var _loadImgFileAsSoundFont:Booleantrue to load 'swf' and 'png' type file as 'ssf' and 'ssfpng'
The default value is false.
| _loadingFileCount | property |
protected var _loadingFileCount:intloading file count
| _loadMP3FileAsBinary | property |
protected var _loadMP3FileAsBinary:Booleantrue to load 'mp3' type file as 'mp3bin'
The default value is false.
| _preserveList | property |
protected var _preserveList:Vector.<SoundLoaderFileData>loading url list
| _rememberHistory | property |
protected var _rememberHistory:Booleantrue to remember history
The default value is false.
| bytesLoaded | property |
bytesLoaded:Number [read-only] file size currently loaded
public function get bytesLoaded():Number| bytesTotal | property |
bytesTotal:Number [read-only] total file size when complete all loadings.
public function get bytesTotal():Number| hash | property |
hash:* [read-only] Object to access all Sound instances.
public function get hash():*| loadedFileCount | property |
loadedFileCount:int [read-only] loaded file count
public function get loadedFileCount():int| loadImgFileAsSoundFont | property |
loadImgFileAsSoundFont:Booleantrue to load 'swf' and 'png' type file as 'ssf' and 'ssfpng'
The default value is false.
public function get loadImgFileAsSoundFont():Boolean public function set loadImgFileAsSoundFont(value:Boolean):void| loadingFileCount | property |
loadingFileCount:int [read-only] loading file count, this number is decreased when the file is loaded.
public function get loadingFileCount():int| loadMP3FileAsBinary | property |
loadMP3FileAsBinary:Booleantrue to load 'mp3' type file as 'mp3bin'
The default value is false.
public function get loadMP3FileAsBinary():Boolean public function set loadMP3FileAsBinary(value:Boolean):void| rememberHistory | property |
rememberHistory:Booleantrue to check ID confirictoin
The default value is false.
public function get rememberHistory():Boolean public function set rememberHistory(value:Boolean):void| SoundLoader | () | Constructor |
public function SoundLoader(eventPriority:int = 0, loadImgFileAsSoundFont:Boolean = false, loadMP3FileAsBinary:Boolean = false, rememberHistory:Boolean = false)Constructor.
ParameterseventPriority:int (default = 0) — priority of all events disopatched by this sound loader.
| |
loadImgFileAsSoundFont:Boolean (default = false) — true to load 'swf' and 'png' type file as 'ssf' and 'ssfpng'
| |
loadMP3FileAsBinary:Boolean (default = false) — true to load 'mp3' type file as 'mp3bin'
| |
rememberHistory:Boolean (default = false) — true to check ID confirictoin,
|
| loadAll | () | method |
public function loadAll():intload all files specifed by SoundLoder.setURL()
Returnsint — loading file count, 0 when no loading
|
| setByteArrayImage | () | method |
public function setByteArrayImage(byteArray:ByteArray, id:String):SoundLoaderFileDataByteArray convert to Loader (image and swf)
Parameters
byteArray:ByteArray — ByteArray to convert
| |
id:String — access key of SoundLoder.hash
|
SoundLoaderFileData — SoundLoaderFileData instance. SoundLoaderFileData is information class of loading file.
|
| setByteArraySound | () | method |
public function setByteArraySound(byteArray:ByteArray, id:String):SoundLoaderFileDataByteArray convert to Sound
Parameters
byteArray:ByteArray — ByteArray to convert
| |
id:String — access key of SoundLoder.hash
|
SoundLoaderFileData — SoundLoaderFileData instance. SoundLoaderFileData is information class of loading file.
|
| setURL | () | method |
public function setURL(urlRequest:URLRequest, id:String = null, type:String = null, checkPolicyFile:Boolean = false):SoundLoaderFileDataset loading file's urls.
Parameters
urlRequest:URLRequest — requesting url
| |
id:String (default = null) — access key of SoundLoder.hash. null to set same as file name (without path, with extension).
| |
type:String (default = null) — file type, "mp3", "wav", "ssf", "ssfpng", "mid", "swf" or "mp3bin" is available, null to detect automatically by file extension. ("swf", "png", "gif", "jpg", "img", "bin", "txt" and "var" are available for non-sound files).
| |
checkPolicyFile:Boolean (default = false) — LoaderContext.checkPolicyFile
|
SoundLoaderFileData — SoundLoaderFileData instance. SoundLoaderFileData is information class of loading file.
|
| toString | () | method |
override public function toString():Stringoutput loaded file information
ReturnsString |
| complete | Event |
flash.events.Eventflash.events.Event.COMPLETE
| error | Event |
flash.events.ErrorEventflash.events.ErrorEvent.ERROR
| progress | Event |
flash.events.ProgressEventflash.events.ProgressEvent.PROGRESS