2016-10-13 00:16:48 点击量:15 标签: 收藏本文
[AS3]as3中获取当前页面地址的类附源代码示例
- //cuplayer.com提示 AS2.0的代码
- import flash.external.ExternalInterface;
- class GetHttpUrlIncludeThisSwf {
- public static function getHttpUrl() {
- return ExternalInterface.call("eval","window.location.href");
- }
- }
- isSwf class is static container only");
- }
- public static function getHttpUrl() {
- return ExternalInterface.call("eval", "window.location.href");
- }
- }
- }
[AS3]as3中获取当前页面地址的类附源代码示例
- //cuplayer.net提示 as3的代码
- package {
- import flash.external.ExternalInterface;
- public class GetHttpUrlIncludeThisSwf {
- public function GetHttpUrlIncludeThisSwf() {
- throw new Error("GetHttpUrlIncludeThisSwf class is static container only");
- }
- public static function getHttpUrl() {
- return ExternalInterface.call("eval", "window.location.href");
- }
- }
- }