WonderflSWFUrl is a utility class that constructs
swf path from code page url
this example gets swf path from the url
http://wonderfl.net/code/ecefc2d92cc7b9ba0caab3e13ef5dc05b9bf02d7
dynamically loads and adds to the display at runtime
/**
* Copyright 9re ( http://wonderfl.net/user/9re )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/zYt0
*/
package {
import flash.display.Loader;
import flash.display.Sprite;
import flash.net.URLRequest;
import net.wonderfl.utils.WonderflSWFUrl;
// WonderflSWFUrl is a utility class that constructs
// swf path from code page url
//
// this example gets swf path from the url
// http://wonderfl.net/code/ecefc2d92cc7b9ba0caab3e13ef5dc05b9bf02d7
// dynamically loads and adds to the display at runtime
public class FlashTest extends Sprite {
private const CODE_PAGE:String = "http://wonderfl.net/code/ecefc2d92cc7b9ba0caab3e13ef5dc05b9bf02d7";
public function FlashTest() {
var ldr:Loader = new Loader;
// the usage is very simple
var path:String = WonderflSWFUrl.getURLFromPageURL(CODE_PAGE);
ldr.load(new URLRequest(path));
addChild(ldr);
}
}
}