Packagevegas.display
Classpublic class AVM2Loader
InheritanceAVM2Loader Inheritance CoreLoader Inheritance flash.display.Loader

This AVM2Loader loads both of AVM1 and AVM2 swf as AVM2.

Example :

     import vegas.display.AVM2Loader ;
     
     import flash.net.URLRequest ;
     import flash.system.LoaderContext ;
     
     var movie:MovieClip ;
     
     var stopIt:Function = function()
     {
        trace("stop movie.") ;
        if ( movie != null )
        {
            movie.stop() ;
        }
     }
     
     var init:Function = function( e:Event ):void
     {
         trace(e) ;
         
         var content:MovieClip = loader.content as MovieClip ;
         movie = content.mc ;
         
         // movie.addFrameScript( 1 , stopIt ) ;    stop the movie in the first frame
         movie.addFrameScript( movie.totalFrames - 1 , stopIt ) ; // stop the movie in the last frame
     }
     
     var loader:AVM2Loader = new AVM2Loader() ;
     
     loader.context = new LoaderContext( false , ApplicationDomain.currentDomain ) ;
     loader.contentLoaderInfo.addEventListener( Event.INIT , init ) ;
     
     loader.x = 25 ;
     loader.y = 25 ;
     
     addChild( loader ) ;
     
     var request:URLRequest = new URLRequest( "avm1.swf"  ) ; // The swf is compiled with the FP8 publish settings.
     loader.load( request ) ;
     



Public Properties
 PropertyDefined By
 Inheritedcontext : LoaderContext
The LoaderContext object of this loader.
CoreLoader
 Inheritedlogger : Logger
Determinates the internal ILogger reference of this Logable object.
CoreLoader
Public Methods
 MethodDefined By
  
Creates a new AVM2Loader instance.
AVM2Loader
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreLoader
  
load(request:URLRequest, context:LoaderContext = null):void
[override] Loads both of AVM1 and AVM2 movie as AVM2 movie.
AVM2Loader
  
loadBytes(bytes:ByteArray, context:LoaderContext = null):void
[override] loads both of AVM1 and AVM2 movie as AVM2 movie.
AVM2Loader
 Inherited
lock():void
Locks the object.
CoreLoader
 Inherited
resetLock():void
Reset the lock security of the display.
CoreLoader
 Inherited
unlock():void
Unlocks the display.
CoreLoader
Constructor Detail
AVM2Loader()Constructor
public function AVM2Loader()

Creates a new AVM2Loader instance.

Method Detail
load()method
override public function load(request:URLRequest, context:LoaderContext = null):void

Loads both of AVM1 and AVM2 movie as AVM2 movie.

Parameters

request:URLRequest
 
context:LoaderContext (default = null)

loadBytes()method 
override public function loadBytes(bytes:ByteArray, context:LoaderContext = null):void

loads both of AVM1 and AVM2 movie as AVM2 movie.

Parameters

bytes:ByteArray
 
context:LoaderContext (default = null)