Flex 全屏问题

今天上午遇到FLEX全屏报错的问题:SecurityError: Error #2152: 不允许使用全屏模式。
      上网搜了一下,解决了问题。参考:http://hi.baidu.com/fanglor/blog/item/068e7bfc3c793b84b801a07a.html
      转载如下:
      

MXML:

-----------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
   import flash.display.*;
  
   private function Full1(evt:MouseEvent):void
   {
    if (this.stage.displayState == StageDisplayState.FULL_SCREEN)
    {
     this.stage.displayState = StageDisplayState.NORMAL;
     stage.scaleMode = StageScaleMode.NO_SCALE;
    }
    else
    {
     this.stage.displayState = StageDisplayState.FULL_SCREEN;
     stage.scaleMode = StageScaleMode.NO_SCALE;
    }
   }
]]>
</mx:Script>
<mx:Button label="全屏" click="Full1(event)" x="28" y="26" width="61" height="37" fontSize="12 "/>
</mx:Application>

-----------------------------------------

HTML:

----------------------------------------

<!-- saved from url=(0014)about:internet -->
<html lang="en">

<!--
Smart developers always View Source.

This application was built using Adobe Flex, an open source framework
for building rich Internet applications that get delivered via the
Flash Player or to desktops via Adobe AIR.

Learn more about Flex at http://flex.org/
// -->

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<!-- BEGIN Browser History required section -->
<link rel="stylesheet" type="text/css" href="history/history.css" />
<!-- END Browser History required section -->

<title></title>
<script src="AC_OETags.js" language="javascript"></script>

<!-- BEGIN Browser History required section -->
<script src="history/history.js" language="javascript"></script>
<!-- END Browser History required section -->

<style>
body { margin: 0px; overflow:hidden }
</style>
<script language="JavaScript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 28;
// -----------------------------------------------------------------------------
// -->
</script>
</head>

<body scroll="no">
<script language="JavaScript" type="text/javascript">
<!--
// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
var hasProductInstall = DetectFlashVer(6, 0, 65);

// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

if ( hasProductInstall && !hasRequestedVersion ) {
// DO NOT MODIFY THE FOLLOWING FOUR LINES
// Location visited after installation is complete if installation is required
var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
var MMredirectURL = window.location;
    document.title = document.title.slice(0, 47) + " - Flash Player Installation";
    var MMdoctitle = document.title;

AC_FL_RunContent(
   "src", "playerProductInstall",
   "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
   "width", "100%",
   "height", "100%",
   "align", "middle",
   "id", "fullstate",
   "quality", "high",
   "bgcolor", "#869ca7",
   "name", "fullstate",
   "allowFullScreen","true",
   "allowScriptAccess","sameDomain",
   "type", "application/x-shockwave-flash",
   "pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else if (hasRequestedVersion) {
// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
    "src", "fullstate",
    "width", "100%",
    "height", "100%",
    "align", "middle",
    "id", "fullstate",
    "quality", "high",
    "bgcolor", "#869ca7",
    "name", "fullstate",
    "allowFullScreen","true",
    "allowScriptAccess","sameDomain",
    "type", "application/x-shockwave-flash",
    "pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else { // flash is too old or we can't detect the plugin
    var alternateContent = 'Alternate HTML content should be placed here. '
+ 'This content requires the Adobe Flash Player. '
   + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
    document.write(alternateContent); // insert non-flash content
}
// -->
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    id="fullstate" width="100%" height="100%"
    codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
    <param name="movie" value="fullstate.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#869ca7" />
    <param name="allowFullScreen" value="true" />
    <param name="allowScriptAccess" value="sameDomain" />
    <embed src="fullstate.swf" quality="high" bgcolor="#869ca7"
     width="100%" height="100%" name="fullstate" align="center"
     play="true"
     loop="false"
     quality="high"
     allowFullScreen="true"
     allowScriptAccess="sameDomain"
     type="application/x-shockwave-flash"
     pluginspage="http://www.adobe.com/go/getflashplayer">
    </embed>
</object>
</noscript>
</body>
</html>

----------------------------------------

说明:

this.stage.displayState //当前舞台的播放状态

StageDisplayState.FULL_SCREEN //全屏模式

StageDisplayState.NORMAL //正常模式

StageScaleMode.NO_SCALE //全屏模式下舞台内部控件不进行缩放

HTML中一定要加上红字部分。否则会报错:

SecurityError: Error #2152: 不允许使用全屏模式。
at flash.display::Stage/set displayState()

切记!



本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/268418.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

数学三次方的计算机符号,数学符号三次方

问题转化为数学问题,小卧室的地面是长方形,把小卧室的面积转化为求长方形的面积;接着启发学生借 助学具来研究。教材提供了三种探究长方形面积的方法:一是摆一摆,数一数,用 1平方厘米的正方形把 长方形铺满,通过数出一共用了多少个小正方形,求出长方形的面积;二是摆一摆,算一算…

网速提高学习周——系统篇

主要是对网卡和协议进行配置&#xff0c;网卡的作用就是把网线传输过来的数据帧进行拆包&#xff0c;或者对发送出去的数据帧进行封装运送。网卡的设置好坏直接影响了数据处理速度&#xff0c;间接影响了上网速度。右击“网上邻居”属性——右击“本地连接”属性&#xff0c;进…

matplotlib 第二次执行报错在 django web服务中

报错内容如下&#xff1a; Exception RuntimeError: RuntimeError(main thread is not in main loop,) in <bound method PhotoImage.__del__ of < Tkinter.PhotoImage instance at 0x7f347192b5a8>> ignored 解决方法&#xff1a;最代码最顶层加&#xff1a; impo…

威斯康星大学计算机专业找工作,威斯康星麦迪逊大学计算机申请条件有哪些?...

申请威斯康星大学麦迪逊分校计算机专业需要以下条件&#xff1a;语言成绩(托福92分;雅思7.0分);需要提交GRE成绩&#xff0c;建议申请学生GPA一定要在3.0以上&#xff0c;文书材料则包括PS、CVEssay、推荐信、资产证明、毕业证学位证等。威斯康星大学麦迪逊分校计算机专业申请难…

最大努力通知方案的关键是什么

最大努力通知方案&#xff0c;在平时的生活中经常会遇到&#xff0c;他会有一定的延迟。我们都接通了支付宝或者微信支付吧&#xff1f;采用APP连接支付宝或微信支付进行操作&#xff0c;就是最大努力控制方案。 支付的流程是APP要求选择支付宝或者微信支付&#xff0c;当在微信…

DBA用于查询当前数据库表格记录条数的脚本

本文中介绍的参考脚本用于查询当前数据库中所有表格的记录条数&#xff0c;   并将结果存入TableInfo表中&#xff0c;不会删除以备用户再做处理与分析。最后请各位读者删除此表。   脚本示例&#xff1a;   if exists (select * from dbo.sysobjects where id object_i…

岳翔南京大学计算机,基于组合IIS路径抽取的组合线性混成系统有界可达性分析-中国科学.PDF...

基于组合IIS路径抽取的组合线性混成系统有界可达性分析-中国科学中国科学: 信息科学 2017 年 第47 卷 第3 期: 288–309论文基于组合 路径抽取的组合线性混成系统有界可达性分析优化1 1 1,2 1,2 1,2解定宝 周岳翔 卜磊 王林章 李宣东1. 南京大学计算机软件新技术国家重点实验室…

asp.net学习之ado.net(连接模式访问)

ado.net框架支持两种模式的数据访问&#xff1a; 连接模式&#xff08;Connected&#xff09;和非连接模式(disconnected)。这一节介绍如何使用连接模式访问数据库中的数据&#xff0c;利用ADO.NET中的Connection,Command,DataReader来获取和修改数据库中的数据 1. 连接模式的…

iphone计算机适配,适配iPhone用户!戴尔将支持iPhone投屏电脑

原标题&#xff1a;适配iPhone用户&#xff01;戴尔将支持iPhone投屏电脑一直以来&#xff0c;苹果的生态系统都非常的强大&#xff0c;但其封闭性一直是不少消费者的槽点。近日&#xff0c;著名的计算机制造商戴尔表示&#xff0c;将会在其系统预装的新版Mobile Connect软件中…

类的特殊成员反射异常处理

类的特殊成员 1.__doc__表示类的描述信息 class Foo(object):""" 描述类信息&#xff0c;这是用于看片的神奇 """def func(self):passprint(Foo.__doc__) #输出&#xff1a;描述类信息&#xff0c;这是用于看片的神奇 2.__module__和 class modu…

在Ubuntu桌面上显示我的电脑等图标

在 GNOME 中显示 计算机&#xff0c;用户主文件夹 和 回收站等桌面图标。* 运行程序 gconf-editor 打开配置编辑器* 选择 apps → nautilus → 桌面* 勾选 computer_icon_visible、home_icon_visible 和 trash_icon_visible 边上的复选框。这些更改会立即生效。转载于:https://…

服务器的智能监控管理结束,通过服务器监控告警进行异常排障

告警是服务监控应用及时发现、主动提醒用户异常的功能&#xff0c;保证了用户在任何情况下都能及时发现异常信息&#xff0c;提升 IT 人员运维的效率。本教程介绍如何使用告警功能实现服务器的异常排障。在目标监控机器上安装 logkit-pro使用智能日志平台的服务监控应用&#x…

SQL创建表格——手写代码

打开phpstudy&#xff0c;打开Navicat for MySQL&#xff0c;进入要创建表格的数据库&#xff0c;点击上方“查询”按钮&#xff0c;“创建查询”&#xff0c;即可输入代码进行创建。 例&#xff1a; create table class( class_id int not null primary key, class varchar(2…

css改变指针形状,css 指针样式

定义鼠标样式cursor:pointer;取值: [ [ ,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help | progress ] ] | inherit[ ,]*: 根据用户定义的资源显示aut…

欧洲最权威的12星座分析①

<?xml:namespace prefix o ns "urn:schemas-microsoft-com:office:office" />听说这分析对于目前的大多数人来说都是最准的。白羊座“白羊吗&#xff1f;太恐怖了&#xff01;他们脾气大、暴力、瞧不起人&#xff0c;还是躲远些、小心为妙&#xff01;” 如…

Elasticsearch 启动报错:received plaintext http traffic on an https channel, closing connection Netty4Ht

elasticsearch 启动报错&#xff1a;received plaintext http traffic on an https channel, closing connection Netty4HttpChannel。 现象&#xff0c;当启动Elasticsearch后&#xff0c;在浏览器输入地址 http://localhost:9200/ 后&#xff0c;报错 received plaintext…