[AS3]as3中页面跳转的源代码示例
[AS3]as3中页面跳转的源代码示例
[AS3]as3中页面跳转的源代码示例
- my_btn.addEventListener(MouseEvent.CLICK, myBtnClicked);
- function myBtnClicked(e:MouseEvent):void {
- var url:String = "http://www.CuPlayer.com/";
- var request:URLRequest = new URLRequest(url);
- try {
- navigateToURL(request, '_blank');
- } catch (e:Error) {
- trace("Error occurred!");
- }
- }
- ///////////////////////////////////////////////////
- // Lazy shorthand. Reminder: navigateToURL SHOULD be in a try/catch
- my_btn.addEventListener(MouseEvent.CLICK, myBtnClicked);
- function myBtnClicked(e:MouseEvent):void {
- navigateToURL(new URLRequest("http://www.CuPlayer.com/"));
- }
- ///////////////////////////////////////////////////
- // Implementation of Steven Sacks' AS3 getURL class
- import net.stevensacks.utils.Web;
- my_btn.addEventListener(MouseEvent.CLICK, myBtnClicked);
- function myBtnClicked(e:MouseEvent):void {
- Web.getURL("http://www.CuPlayer.com/");
- }
热门文章推荐
- [JS]window.location获取url各项参数详解
- [JS]jQuery,javascript获得网页的高度和宽度
- [JS]视频弹窗视频弹出层videoLightBox(含三种播放器的用法)
- [JS]JS提交中文encodeURI两次转码
- [JS]js版方面encodeURI转码和decodeURI解码的用法实例
- [JS]js取当前机子的时间戳实例
- [JS]AES加密(基于crypto-js)PHP后端解密
- [JS]data:image/png;base64写法的用途及说明
请稍候...