| Package | net.guttershark.managers |
| Class | public final class AssetManager |
See also
| Property | Defined by | ||
|---|---|---|---|
| lastLibraryName : String [read-only]
The last libraryName that was used to register an object.
| AssetManager | ||
| Method | Defined by | ||
|---|---|---|---|
|
addAsset(libraryName:String, obj:String, source:* = null):void
Register an asset in the library.
| AssetManager | ||
|
dispose():void
Purge all assets from the library.
| AssetManager | ||
|
getAsset(libraryName:String):*
A generic method to get any asset from the library.
| AssetManager | ||
|
getBitmap(libraryName:String):Bitmap
Get a loaded asset as a Bitmap.
| AssetManager | ||
|
getBitmapFromSWFLibrary(libraryName:String, bitmapLinkageId:String):Bitmap
Get a Bitmap from a swf library.
| AssetManager | ||
|
getClassFromSWFLibrary(libraryName:String, classNameInLibrary:String):Class
Get a Class reference from a swf library.
| AssetManager | ||
|
Get an flv instance.
| AssetManager | ||
|
getFontFromSWFLibrary(libraryName:String, fontLinkageId:String):Font
Get an embedded Font from a SWF library.
| AssetManager | ||
|
getMovieClipFromSWFLibrary(libraryName:String, classNameInLibrary:String):MovieClip
Get a movie clip from a swf library.
| AssetManager | ||
|
getNetStream(libraryName:String):NetStream
Get a net stream that was used to load an flv.
| AssetManager | ||
|
getSound(libraryName:String):Sound
Get a Sound asset.
| AssetManager | ||
|
getSoundFromSWFLibrary(libraryName:String, soundLinkageId:String):Sound
Get a Sound from a swf library
| AssetManager | ||
|
getSpriteFromSWFLibrary(libraryName:String, classNameInLibrary:String):Sprite
Get a sprite from a swf library.
| AssetManager | ||
|
getStyleSheet(libraryName:String):StyleSheet
Get a StyleSheet object that was preloaded from a css file.
| AssetManager | ||
|
getSWF(libraryName:String):Loader
Get a SWF asset from the library.
| AssetManager | ||
|
getXML(libraryName:String):XML
Get an XML asset.
| AssetManager | ||
|
[static]
Singleton Instance.
| AssetManager | ||
|
isAvailable(libraryName:String):Boolean
Check to see if an asset is available in the library.
| AssetManager | ||
|
removeAsset(libraryName:String):void
Remove an asset from the library.
| AssetManager | ||
| lastLibraryName | property |
lastLibraryName:String [read-only]The last libraryName that was used to register an object. This is useful for when you don't neccessarily have a libraryName available, but you know that the librayName you need was the last asset registered in the AssetManager.
Implementation public function get lastLibraryName():String
var am:AssetManager = AssetManager.gi(); addChild(am.getBitmap(am.lastLibraryName)); //assuming you know the last asset was a bitmap
| addAsset | () | method |
public function addAsset(libraryName:String, obj:String, source:* = null):voidRegister an asset in the library.
ParameterslibraryName:String — The item id.
|
|
obj:String — The loaded asset object.
|
|
source:* (default = 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.
|
* |
| 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 |
| 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 |
| 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 |
| getFLV | () | method |
public function getFLV(libraryName:String):FLVGet an flv instance.
ParameterslibraryName:String — The library name used when the asset was registered.
|
FLV |
| 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 |
| 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 |
| getNetStream | () | method |
public function getNetStream(libraryName:String):NetStreamGet a net stream that was used to load an flv.
ParameterslibraryName:String — The library name used when the asset was registered.
|
NetStream |
| getSound | () | method |
public function getSound(libraryName:String):SoundGet a Sound asset.
ParameterslibraryName:String — The library name used when the asset was registered.
|
Sound |
| 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 |
| 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 |
| getStyleSheet | () | method |
public function getStyleSheet(libraryName:String):StyleSheetGet a StyleSheet object that was preloaded from a css file.
ParameterslibraryName:String — The library name used when the asset was registered.
|
StyleSheet |
| 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 |
| getXML | () | method |
public function getXML(libraryName:String):XMLGet an XML asset.
ParameterslibraryName:String — The library name used when the asset was registered.
|
XML |
| 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 |
| removeAsset | () | method |
public function removeAsset(libraryName:String):voidRemove an asset from the library.
ParameterslibraryName:String — The asset's libraryName to remove.
|