海
Related images
ActionScript3 source code
/**
* Copyright ProjectNya ( http://wonderfl.net/user/ProjectNya )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/h5t3
*/
////////////////////////////////////////////////////////////////////////////////
// 海
////////////////////////////////////////////////////////////////////////////////
package {
import flash.display.Sprite;
import flash.display.Loader;
import flash.events.Event;
import flash.net.URLRequest;
import flash.system.LoaderContext;
import flash.system.Security;
import flash.display.BitmapData;
import flash.display.Bitmap;
[SWF(backgroundColor="#000000", width="465", height="465", frameRate="30")]
public class Main extends Sprite {
private var bitmapData:BitmapData;
private var bitmap:Bitmap;
private var bx:int;
private var by:int;
private static var basePath:String = "http://assets.wonderfl.net/images/related_images/";
private static var filePath:String = "1/19/191f/191f2bf9a8254eadaea5222f5a629ca920bb6e6b";
public function Main() {
//Wonderfl.capture_delay(1);
init();
}
private function init():void {
graphics.beginFill(0x000000);
graphics.drawRect(0, 0, 465, 465);
graphics.endFill();
//
Security.allowDomain("assets.wonderfl.net");
Security.loadPolicyFile("http://assets.wonderfl.net/crossdomain.xml");
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initialize, false, 0, true);
loader.load(new URLRequest(basePath + filePath), new LoaderContext(true));
}
private function initialize(evt:Event):void {
evt.target.removeEventListener(Event.INIT, initialize);
var content:Bitmap = Bitmap(evt.target.content);
bitmapData = content.bitmapData;
bx = int((465 - content.width)/2);
by = int((465 - content.height)/2);
content =null;
//
bitmap = new Bitmap(bitmapData);
addChild(bitmap);
bitmap.x = bx;
bitmap.y = by;
}
}
}