Forked from: mash's wonderfl KeyVisual V.4.en diff:1 forked from: wonderfl KeyVisual V.4.en doridori forked:0favorite:0lines:22license : All rights reserved modified : 2009-02-10 03:59:31 Embed Tweet // forked from mash's wonderfl KeyVisual V.4.en // // -- welcome to wonderfl -- // // wonderfl is a service where you can build a Flash online. // // write Actionscript3 code in a textarea, // and your code will be compiled server side. // // Your compiled Flash will be reloaded automatically // in the right side of the page, // so write code and see it real-time. // // Well, why not "FORK" this code and see how it goes? // package { import flash.display.Sprite; import flash.display.Loader; import flash.events.IEventDispatcher; import flash.events.IOErrorEvent; import flash.events.HTTPStatusEvent; import flash.net.URLRequest; [SWF(backgroundColor="#FFFFFF", frameRate=10)] public class FlashTest extends Sprite { public function FlashTest() { var loader :Loader = new Loader; var url :String = "/swf/demo_en.swf"; loader.load( new URLRequest(url) ); addListeners( loader.contentLoaderInfo ); addChild( loader ); } private function addListeners( d :IEventDispatcher ) :void { // do nothing d.addEventListener( IOErrorEvent.IO_ERROR, function(e :IOErrorEvent) :void {} ); d.addEventListener( HTTPStatusEvent.HTTP_STATUS, function(e :HTTPStatusEvent) :void {} ); } } } Code Fullscreen Preview Fullscreen addEventListener url Loader contentLoaderInfo HTTPStatusEvent HTTPStatusEvent.HTTP_STATUS addChild load URLRequest String