GraphicLoad

Kind of class:public class
Package:org.casalib.load
Inherits from:CasaLoader < LoadItem < BaseLoadItem < Process < RemovableEventDispatcher < EventDispatcher
Version:01/20/09
Author:Aaron Clinger
Classpath:org.casalib.load.GraphicLoad
File last modified:Tuesday, 20 January 2009, 16:26:19
Provides an easy and standardized way to load images or SWF files.
Example:
  • package {
        import flash.display.MovieClip;
        import org.casalib.events.LoadEvent;
        import org.casalib.load.GraphicLoad;
    
    
        public class MyExample extends MovieClip {
            protected var _graphicLoad:GraphicLoad;
    
    
            public function MyExample() {
                super();
    
                this._graphicLoad = new GraphicLoad("external.swf");
                this._graphicLoad.addEventListener(LoadEvent.COMPLETE, this._onComplete);
                this._graphicLoad.start();
            }
    
            protected function _onComplete(e:LoadEvent):void {
                this.addChild(this._graphicLoad.contentAsMovieClip);
            }
        }
    }

Summary


Constructor
  • GraphicLoad (request:*, context:LoaderContext = null)
    • Creates and defines a GraphicLoad.
Class properties
Class properties inherited from Process
Instance properties
  • content : DisplayObject
    • The content received from the GraphicLoad.
  • contentAsMovieClip : MovieClip
    • The data received from the DataLoad data typed as MovieClip.
  • contentAsBitmap : Bitmap
    • The data received from the DataLoad data typed as Bitmap.
  • contentAsBitmapData : BitmapData
    • The data received from the DataLoad data typed as BitmapData.

Constructor

GraphicLoad

public function GraphicLoad (
request:*, context:LoaderContext = null)

Creates and defines a GraphicLoad.
Parameters:
request:
A String or an URLRequest reference to the file you wish to load.
context:
An optional LoaderContext object.

Instance properties

content

public content:DisplayObject
(read)

The content received from the GraphicLoad. Available after load is complete.

contentAsBitmap

public contentAsBitmap:Bitmap
(read)

The data received from the DataLoad data typed as Bitmap. Available after load is complete.

contentAsBitmapData

public contentAsBitmapData:BitmapData
(read)

The data received from the DataLoad data typed as BitmapData. Available after load is complete.

contentAsMovieClip

public contentAsMovieClip:MovieClip
(read)

The data received from the DataLoad data typed as MovieClip. Available after load is complete.