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 ); } }}
Name (required)
email (will not be published) (required)
Website