Packagecom.greensock.loading.display
Classpublic class FlexContentDisplay
InheritanceFlexContentDisplay Inheritance mx.core.UIComponent

A container for visual content that is loaded by any of the following: ImageLoaders, SWFLoaders, or VideoLoaders which is to be used in Flex. It is essentially a UIComponent that has a loader property for easily referencing the original loader, as well as a rawContent property. That way, you can add a FlexContentDisplay 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 FlexContentDisplay's loader property like myContent.loader.url or (myContent.loader as SWFLoader).getClass("com.greensock.TweenLite");. For

IMPORTANT: In order for the LoaderMax loaders to use FlexContentDisplay instead of the regular ContentDisplay class, you must set the LoaderMax.contentDisplayClass property to FlexContentDisplay once like:


Example
Example AS3 code:
 import com.greensock.loading.*;
 import com.greensock.loading.display.*;
 
 LoaderMax.contentDisplayClass = FlexContentDisplay;
 
After that, all ImageLoaders, SWFLoaders, and VideoLoaders will return FlexContentDisplay objects as their content instead of regular ContentDisplay objects.

Copyright 2010, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.



Public Properties
 PropertyDefined by
  loader : LoaderItem
The loader whose rawContent populates this FlexContentDisplay.
FlexContentDisplay
  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 FlexContentDisplay.
FlexContentDisplay
Public Methods
 MethodDefined by
  
Constructor
FlexContentDisplay
  
dispose(unloadLoader:Boolean = true, disposeLoader:Boolean = true):void
Removes the FlexContentDisplay 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).
FlexContentDisplay
Property detail
loaderproperty
loader:LoaderItem  [read-write]

The loader whose rawContent populates this FlexContentDisplay. If you get the loader's content, it will return this FlexContentDisplay object.

Implementation
    public function get loader():LoaderItem
    public function set loader(value:LoaderItem):void
rawContentproperty 
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 FlexContentDisplay.

Implementation
    public function get rawContent():*
    public function set rawContent(value:*):void
Constructor detail
FlexContentDisplay()constructor
public function FlexContentDisplay(loader:LoaderItem)

Constructor

Parameters
loader:LoaderItem — The Loader object that will populate the FlexContentDisplay's rawContent.
Method detail
dispose()method
public function dispose(unloadLoader:Boolean = true, disposeLoader:Boolean = true):void

Removes the FlexContentDisplay 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 FlexContentDisplay and makes it eligible for garbage collection internally, although if you added any listeners manually, you should remove them as well.

Parameters
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.