package {
import flash.display.*;
import flash.net.URLRequest;
import flash.events.Event;
public class LoaderExample extends Sprite {
private var _loader:Loader;
public function LoaderExample( ) {
_loader = new Loader( );
addChild( _loader );
_loader.contentLoaderInfo.addEventListener( Event.INIT, handleInit );
_loader.load( new URLRequest( "ExternalMovie.swf" ) );
}
private function handleInit( event:Event ):void {
var movie:* = _loader.content;
trace( movie.getColor( ) );
movie.setColor( 0xFF0000 );
}
}
}
|