新しいウインドウで開く
♥0 |
Line 19 |
Modified 2010-02-01 19:08:39 |
MIT License
archived:2017-03-20 02:40:44
ActionScript3 source code
/**
* Copyright geko ( http://wonderfl.net/user/geko )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/o6X6
*/
package {
import flash.display.Sprite;
import flash.display.LoaderInfo;
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.net.navigateToURL;
import com.bit101.components.PushButton;
public class FlashTest extends Sprite {
private var bt:PushButton;
private var url:URLRequest;
public function FlashTest() {
bt = new PushButton(this,10,10,"new Window",openNewWindow);
//loaderInfo.loaderURLはswf自体のURL
url = new URLRequest(loaderInfo.loaderURL);
}
private function openNewWindow(event:MouseEvent):void{
//新しいウインドウで開く
navigateToURL(url, "_blank");
}
}
}