| Package | vegas.display |
| Class | public class AVM2Loader |
| Inheritance | AVM2Loader CoreLoader flash.display.Loader |
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 ) ;
| Method | Defined By | ||
|---|---|---|---|
Creates a new AVM2Loader instance. | AVM2Loader | ||
![]() | 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 | ||
![]() | lock():void
Locks the object. | CoreLoader | |
![]() | resetLock():void
Reset the lock security of the display. | CoreLoader | |
![]() | unlock():void
Unlocks the display. | CoreLoader | |
| AVM2Loader | () | Constructor |
public function AVM2Loader()Creates a new AVM2Loader instance.
| load | () | method |
override public function load(request:URLRequest, context:LoaderContext = null):voidLoads 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):voidloads both of AVM1 and AVM2 movie as AVM2 movie.
Parameters
bytes:ByteArray | |
context:LoaderContext (default = null) |