当前位置: 移动技术网 > IT编程>UI设计>设计软件 > Flex中通过和Security类中的常量

Flex中通过和Security类中的常量

2019年03月20日  | 移动技术网IT编程  | 我要评论
接下来的例子演示了flex中通过和security类中的常量(local_trusted, local_with_file, local_with_network以及remote)对比sandboxtype属性,检查应用程序当前安全沙盒设置。
下面是完整代码:
复制代码代码如下:<?xml version="1.0" encoding="utf-8"?> <mx:application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalalign="middle" backgroundcolor="white" creationcomplete="init();"> <mx:script> <![cdata[ private function init():void { switch (security.sandboxtype) { case security.local_trusted: sandboxlabel.text += " (local trusted)"; break; case security.local_with_file: sandboxlabel.text += " (local with file)"; break; case security.local_with_network: sandboxlabel.text += " (local with network)"; break; case security.remote: sandboxlabel.text += " (remote)"; break; } } ]]> </mx:script> <mx:form> <mx:formitem label="security.sandboxtype:" fontsize="16"> <mx:label id="sandboxlabel" text="{security.sandboxtype}" /> </mx:formitem> </mx:form> </mx:application>

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网