| Package | net.guttershark.preloading |
| Class | public class AssetLibrary |
| Implements | IDisposable |
See also
| Method | Defined by | ||
|---|---|---|---|
|
addAsset(libraryName:String, obj:*):void
Register an asset in the library.
| AssetLibrary | ||
|
dispose():void
Purge all assets from the library.
| AssetLibrary | ||
|
getAsset(libraryName:String):*
A generic method to get any asset from the library.
| AssetLibrary | ||
|
getBitmap(libraryName:String):Bitmap
Get a loaded asset as a Bitmap.
| AssetLibrary | ||
|
getBitmapFromSWFLibrary(libraryName:String, bitmapLinkageId:String):Bitmap
Get a Bitmap from a swf library.
| AssetLibrary | ||
|
getClassFromSWFLibrary(libraryName:String, classNameInLibrary:String):Class
Get a Class reference from a swf library.
| AssetLibrary | ||
|
getFontFromSWFLibrary(libraryName:String, fontLinkageId:String):Font
Get an embedded Font from a SWF library.
| AssetLibrary | ||
|
getMovieClipFromSWFLibrary(libraryName:String, classNameInLibrary:String):MovieClip
Get a movie clip from a swf library.
| AssetLibrary | ||
|
getSound(libraryName:String):Sound
Get a Sound asset.
| AssetLibrary | ||
|
getSoundFromSWFLibrary(libraryName:String, soundLinkageId:String):Sound
Get a Sound from a swf library
| AssetLibrary | ||
|
getSpriteFromSWFLibrary(libraryName:String, classNameInLibrary:String):Sprite
Get a sprite from a swf library.
| AssetLibrary | ||
|
getSWF(libraryName:String):Loader
Get a SWF asset from the library.
| AssetLibrary | ||
|
getXML(libraryName:String):XML
Get an XML asset.
| AssetLibrary | ||
|
[static]
Singleton Instance.
| AssetLibrary | ||
|
isAvailable(libraryName:String):Boolean
Check to see if an asset is available in the library.
| AssetLibrary | ||
|
removeAsset(libraryName:String):void
Remove an asset from the library.
| AssetLibrary | ||
| addAsset | () | method |
public function addAsset(libraryName:String, obj:*):voidRegister an asset in the library.
ParameterslibraryName:String — The item id.
|
|
obj:* — The loaded asset object.
|
— If libraryName is null.
|
|
— If obj is null.
|
| dispose | () | method |
public function dispose():voidPurge all assets from the library. The AssetLibrary is still usable after a dispose, just the assets are disposed of.
| getAsset | () | method |
public function getAsset(libraryName:String):*A generic method to get any asset from the library.
ParameterslibraryName:String — The library name used when the asset was registered.
|
* — The asset is returned un-typed.
|
— If the inZipLibrary specified was not a zip registered in the library.
|
|
— If the asset was not registered in the library.
|
| getBitmap | () | method |
public function getBitmap(libraryName:String):BitmapGet a loaded asset as a Bitmap.
ParameterslibraryName:String — The library name used when the asset was registered.
|
Bitmap — Bitmap returns a flash.display.Bitmap asset.
|
| getBitmapFromSWFLibrary | () | method |
public function getBitmapFromSWFLibrary(libraryName:String, bitmapLinkageId:String):BitmapGet a Bitmap from a swf library.
ParameterslibraryName:String — The library name used when the asset was registered.
|
|
bitmapLinkageId:String — The bitmaps linkage Id.
|
Bitmap — Bitmap Returns a Font instance.
|
| getClassFromSWFLibrary | () | method |
public function getClassFromSWFLibrary(libraryName:String, classNameInLibrary:String):ClassGet a Class reference from a swf library.
ParameterslibraryName:String — The library name used when the asset was registered.
|
|
classNameInLibrary:String — The class name in the loaded swf's library.
|
Class — MovieClip Returns the asset as a MovieClip
|
| getFontFromSWFLibrary | () | method |
public function getFontFromSWFLibrary(libraryName:String, fontLinkageId:String):FontGet an embedded Font from a SWF library. The Font is also registered through Font.registerFont before it's returned.
ParameterslibraryName:String — The library name used when the asset was registered.
|
|
fontLinkageId:String — The font linkage id.
|
Font — Font Returns a Font instance.
|
| getMovieClipFromSWFLibrary | () | method |
public function getMovieClipFromSWFLibrary(libraryName:String, classNameInLibrary:String):MovieClipGet a movie clip from a swf library.
ParameterslibraryName:String — The library name used when the asset was registered.
|
|
classNameInLibrary:String — The class name in the loaded swf's library.
|
MovieClip — MovieClip Returns the asset as a MovieClip
|
| getSound | () | method |
public function getSound(libraryName:String):SoundGet a Sound asset.
ParameterslibraryName:String — The library name used when the asset was registered.
|
Sound — Sound returns a flash.media.Sound instance.
|
| getSoundFromSWFLibrary | () | method |
public function getSoundFromSWFLibrary(libraryName:String, soundLinkageId:String):SoundGet a Sound from a swf library
ParameterslibraryName:String — The library name used when the asset was registered.
|
|
soundLinkageId:String — The sounds linkage id from the library.
|
Sound — Sound Returns a Sound instance.
|
| getSpriteFromSWFLibrary | () | method |
public function getSpriteFromSWFLibrary(libraryName:String, classNameInLibrary:String):SpriteGet a sprite from a swf library.
ParameterslibraryName:String — The library name used when the asset was registered.
|
|
classNameInLibrary:String — The class name in the loaded swf's library.
|
Sprite — Sprite Returns the asset as a MovieClip
|
| getSWF | () | method |
public function getSWF(libraryName:String):LoaderGet a SWF asset from the library.
The asset is cast as a Loader class
ParameterslibraryName:String — The library name used when the asset was registered.
|
Loader — Loader Returns the asset as a Loader.
|
See also
| getXML | () | method |
public function getXML(libraryName:String):XMLGet an XML asset.
ParameterslibraryName:String — The library name used when the asset was registered.
|
XML — XML returns the XML instance.
|
| gi | () | method |
| isAvailable | () | method |
public function isAvailable(libraryName:String):BooleanCheck to see if an asset is available in the library.
ParameterslibraryName:String — The libraryName used to register the asset.
|
Boolean — Boolean
|
| removeAsset | () | method |
public function removeAsset(libraryName:String):voidRemove an asset from the library.
ParameterslibraryName:String — The asset's libraryName to remove.
|
— If libraryName is null.
|