In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: 画像を読み込む2

Loaderごとステージに置く例
*
Get Adobe Flash player
by amashio 06 Aug 2010
    Embed
/**
 * Copyright amashio ( http://wonderfl.net/user/amashio )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/m1QT
 */

// forked from umhr's 画像を読み込む2
/*
 * Loaderごとステージに置く例
 * */
package {
    import flash.display.Loader;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.net.URLRequest;
    
    [SWF(backgroundColor="0xCCCCCC")]
    public class Main extends Sprite {
        private var _loader:Loader;
        public function Main() {
            _loader = new Loader();
            var uRLRequest:URLRequest = new URLRequest("http://assets.wonderfl.net/images/related_images/e/e0/e0cf/e0cf8ee7ba2ec3781d2a28710adf1e7d94ccfbfe");
            _loader.load(uRLRequest);
            _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
        }
        
        private function onComplete(event:Event):void {
            //読み込み完了したら、Loaderごとステージに置く例
            addChild(_loader);
        }
    }
}