flash on 2010-3-14
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_ja.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 {} );
}
}
}