Package | com.greensock.loading.display |
Class | public class ContentDisplay |
Inheritance | ContentDisplay ![]() |
loader
property for easily referencing
the original loader, as well as a rawContent
property. That way, you can add a ContentDisplay
to the display list or populate an array with as many as you want and then if you ever need to unload()
the content or reload it or figure out its url, etc., you can reference your ContentDisplay's loader
property like myContent.loader.url
or (myContent.loader as SWFLoader).getClass("com.greensock.TweenLite");
FlexContentDisplay
class instead which extends UIComponent (a Flex requirement).
All you need to do is set the LoaderMax.contentDisplayClass
property to FlexContentDisplay once like:
import com.greensock.loading.*; import com.greensock.loading.display.*; LoaderMax.contentDisplayClass = FlexContentDisplay;
content
instead of regular ContentDisplay objects. Property | Defined by | ||
---|---|---|---|
loader : LoaderItem
The loader whose rawContent populates this ContentDisplay.
| ContentDisplay | ||
rawContent : * The raw content which can be a Bitmap, a MovieClip, a Loader, or a Video depending on the type of loader associated with the ContentDisplay.
| ContentDisplay |
Method | Defined by | ||
---|---|---|---|
ContentDisplay(loader:LoaderItem)
Constructor
| ContentDisplay | ||
dispose(unloadLoader:Boolean = true, disposeLoader:Boolean = true):void
Removes the ContentDisplay from the display list (if necessary), dumps the
rawContent ,
and calls unload() and dispose() on the loader (unless you define otherwise with
the optional parameters). | ContentDisplay |
loader | property |
loader:LoaderItem
[read-write] The loader whose rawContent populates this ContentDisplay. If you get the loader's content
, it will return this ContentDisplay object.
public function get loader():LoaderItem
public function set loader(value:LoaderItem):void
rawContent | property |
rawContent:*
[read-write]The raw content which can be a Bitmap, a MovieClip, a Loader, or a Video depending on the type of loader associated with the ContentDisplay.
Implementation public function get rawContent():*
public function set rawContent(value:*):void
ContentDisplay | () | constructor |
public function ContentDisplay(loader:LoaderItem)
Constructor
Parametersloader:LoaderItem — The Loader object that will populate the ContentDisplay's rawContent .
|
dispose | () | method |
public function dispose(unloadLoader:Boolean = true, disposeLoader:Boolean = true):void
Removes the ContentDisplay from the display list (if necessary), dumps the rawContent
,
and calls unload()
and dispose()
on the loader (unless you define otherwise with
the optional parameters). This essentially destroys the ContentDisplay and makes it eligible for garbage
collection internally, although if you added any listeners manually, you should remove them as well.
unloadLoader:Boolean (default = true ) — If true , unload() will be called on the loader. It is true by default.
|
|
disposeLoader:Boolean (default = true ) — If true , dispose() will be called on the loader. It is true by default.
|