·您当前的位置:首页 > 技术教程 > AS2与AS3技术 >

[AS3]as3中获取当前页面地址的类附源代码示例

时间:2013-04-20 11:09CuPlayer.com
[AS3]as3中获取当前页面地址的类附源代码示例,as3获取页面,as3获取地址

[AS3]as3中获取当前页面地址的类附源代码示例

  1. //cuplayer.com提示 AS2.0的代码 
  2. import flash.external.ExternalInterface;    
  3.     class GetHttpUrlIncludeThisSwf {    
  4.         public static function getHttpUrl() {    
  5.             return ExternalInterface.call("eval","window.location.href");    
  6.          }    
  7.     } 
  8. isSwf class is static container only");        
  9.              }    
  10.             public static function getHttpUrl() {    
  11.                 return ExternalInterface.call("eval", "window.location.href");    
  12.              }    
  13.          }    
  14.     }  

[AS3]as3中获取当前页面地址的类附源代码示例

  1. //cuplayer.net提示 as3的代码 
  2.     package {    
  3.         import flash.external.ExternalInterface;    
  4.         public class GetHttpUrlIncludeThisSwf {    
  5.             public function GetHttpUrlIncludeThisSwf() {        
  6.                 throw new Error("GetHttpUrlIncludeThisSwf class is static container only");        
  7.              }    
  8.             public static function getHttpUrl() {    
  9.                 return ExternalInterface.call("eval", "window.location.href");    
  10.              }    
  11.          }    
  12.     }  

 

热门文章推荐

请稍候...

保利威视云平台-轻松实现点播直播视频应用

酷播云数据统计分析跨平台播放器