ActionScript 3 检测您的SWF是通过HTTP还是本地运行

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3 检测您的SWF是通过HTTP还是本地运行相关的知识,希望对你有一定的参考价值。

/*
In Flex the Application needs to be complete so run this code within your applicationComplete event handler and pass a Boolean into a Data model somewhere so you can use it elsewhere.
*/

var isLocal:Boolean = loaderInfo.url.indexOf("file") == 0;

以上是关于ActionScript 3 检测您的SWF是通过HTTP还是本地运行的主要内容,如果未能解决你的问题,请参考以下文章