用于在HTML页面中嵌入视频显示控件的全屏选项

用于在HTML页面中嵌入视频显示控件的全屏选项,html,apache-flex,actionscript-3,flex4,Html,Apache Flex,Actionscript 3,Flex4,如果我的html页面中有一个flex swc,并且flex swc包含一个flex 4 videoDisplay播放器,它有一个全屏选项。我如何使全屏工作 因为当我点击VidReadisplay的全屏按钮时,我得到一个错误: SecurityError: Error #2152: Full screen mode is not allowed. at flash.display::Stage/set_displayState() at flash.display::Stage/set displ

如果我的html页面中有一个flex swc,并且flex swc包含一个flex 4 videoDisplay播放器,它有一个全屏选项。我如何使全屏工作

因为当我点击VidReadisplay的全屏按钮时,我得到一个错误:

SecurityError: Error #2152: Full screen mode is not allowed.
at flash.display::Stage/set_displayState()
at flash.display::Stage/set displayState()
at spark.components::VideoPlayer/fullScreenButton_clickHandler()
但是如果我运行flex应用程序本身,全屏选项就可以正常工作

我的html代码如下所示:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<body onload="MM_preloadImages('assets/index_main/images/nav-features-over.gif','assets/index_main/images/nav-signup-over.gif','assets/index_main/images/nav-pricing-over.gif')">
<div align="center">
  <table width="1024" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td height="500" bgcolor="#C2E8F3" class="pricingBG"><div align="center">
        <p>
          <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,1,0,0','width','1024','height','1850','src','cloud_tour','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','cloud_tour' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,1,0,0" width="1024" height="1850">
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
    backgroundColor="#FFFFFF" backgroundGradientColors="[#FFFFFF, #FFFFFF]"
    fontFamily="Arial" fontSize="13" width="1024" height="1850" verticalGap="20"
    verticalScrollPolicy="off" horizontalScrollPolicy="off"
    xmlns:controls="com.fxcomponentsWei.controls.*" xmlns:s="library://ns.adobe.com/flex/spark">
    <mx:Script>
        <![CDATA[           
            import mx.containers.Canvas;

            private const VIDEO_SRC_MY_FILES:String = 'assets/index_main/videos/my_files.flv';
            private const VIDEO_SRC_CALENDAR:String = 'assets/index_main/videos/calendar.flv';
            private const VIDEO_SRC_PROFILE_EXPLORER:String = 'assets/index_main/videos/profile_explorer.flv';
            private const VIDEO_SRC_GROUPS:String = 'assets/index_main/videos/groups.flv';

            private function handlePlay(e:Event):void
            {
                var cvs:Canvas = e.currentTarget.parent.parent as Canvas;
                var vid:VideoPlayer = cvs.getChildByName('vid') as VideoPlayer;
                vid.enabled = true;
                switch(e.currentTarget.data)
                {   //assign vid source
                    case 'my_files':                        
                        vid.source = VIDEO_SRC_MY_FILES;                                                                        
                        break;
                    case 'calendar':                        
                        vid.source = VIDEO_SRC_CALENDAR;                                                                        
                        break;
                    case 'profile_explorer':                        
                        vid.source = VIDEO_SRC_PROFILE_EXPLORER;                                                                        
                        break;
                    case 'groups':                          
                        vid.source = VIDEO_SRC_GROUPS;                                                                          
                        break;
                    default:
                        throw new Error('invalid video request');
                }
                cvs.removeChild(e.currentTarget.parent);    //remove play box button
            }

         ]]>
    </mx:Script>
    <s:VideoDisplay name="test" id="blah" width="320" height="160"
                    source="assets/index_main/videos/my_files.flv"/>
    <mx:Canvas width="500" height="300">
        <s:VideoPlayer name="vid" width="100%" height="100%" autoPlay="true" autoRewind="true"
            enabled="false"/>
        <mx:Box backgroundColor="#FFFFFF" width="100%" height="100%" backgroundAlpha="0.5"
            verticalAlign="middle" horizontalAlign="center">
            <mx:Image source="assets/index_main/images/play-128x128.png" click="handlePlay(event)"
                data="{'my_files'}" buttonMode="true" toolTip="click to play"/>
        </mx:Box>
    </mx:Canvas>    
    <mx:Text width="600">
        <mx:htmlText>
            <![CDATA[
<b>My Files</b>
Want the ability to access, share and manage files from wherever you happen to be, without having to invest in expensive technology or IT staff? Cloud makes it simple and affordable to store and manage all your digital content – from financial, creative and productivity documents to image, audio and video files – right from your laptop, your smartphone or any other web-enabled device.             
            ]]>
        </mx:htmlText>
    </mx:Text>
    <mx:Canvas width="500" height="300">
        <s:VideoPlayer name="vid" width="100%" height="100%" autoPlay="true" autoRewind="true"
         enabled="false"/>
        <mx:Box backgroundColor="#FFFFFF" width="100%" height="100%" backgroundAlpha="0.5"
            verticalAlign="middle" horizontalAlign="center">
            <mx:Image source="assets/index_main/images/play-128x128.png" click="handlePlay(event)"
                data="{'profile_explorer'}" buttonMode="true" toolTip="click to play"/>
        </mx:Box>
    </mx:Canvas>    
    <mx:Text width="600">
        <mx:htmlText>
            <![CDATA[
<b>Profile Explorer</b>
Connect other services to your profile, and keep in touch with all your friends in the Cloud and beyond. See what you're sharing with others, and what your friends are saying about you.               
            ]]>
        </mx:htmlText>
    </mx:Text>
    <mx:Canvas width="500" height="300">
        <s:VideoPlayer name="vid" width="100%" height="100%" autoPlay="true" autoRewind="true"
            enabled="false"/>
        <mx:Box backgroundColor="#FFFFFF" width="100%" height="100%" backgroundAlpha="0.5"
            verticalAlign="middle" horizontalAlign="center">
            <mx:Image source="assets/index_main/images/play-128x128.png" click="handlePlay(event)"
                data="{'calendar'}" buttonMode="true" toolTip="click to play"/>
        </mx:Box>
    </mx:Canvas>
    <mx:Text width="600">
        <mx:htmlText>
            <![CDATA[
<b>Calendar</b>
Organizing your schedule shouldn't be a burden. With the Cloud Calendar, it's easy to keep track of life's important events all in one place. You can invite other people to events on your calendar. Guests can RSVP to your events by email or via Cloud Calendar or Access your calendar however and whenever you want by syncing events with Microsoft Outlook, Apple iCal, Mozilla Sunbird or your smartphone.             
            ]]>
        </mx:htmlText>
    </mx:Text>
    <mx:Canvas width="500" height="300">
        <s:VideoPlayer name="vid" width="100%" height="100%" autoPlay="true" autoRewind="true"
            enabled="false"/>
        <mx:Box backgroundColor="#FFFFFF" width="100%" height="100%" backgroundAlpha="0.5"
            verticalAlign="middle" horizontalAlign="center">
            <mx:Image source="assets/index_main/images/play-128x128.png" click="handlePlay(event)"
                data="{'groups'}" buttonMode="true" toolTip="click to play"/>
        </mx:Box>
    </mx:Canvas>
    <mx:Text width="600">
        <mx:htmlText>
            <![CDATA[
<b>Groups</b>
Connect with the people you need to get the job done. Unlike other tools, Cloud Groups lets you work with anyone, whether they’re inside or outside the company firewall. Invite them into Cloud Groups to work together on projects, share files, assign tasks or catch up in real-time.               
            ]]>
        </mx:htmlText>
    </mx:Text>
</mx:Application>


AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,1,0,0','width','1024','height','1850','src','cloud\u tour','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash","电影","云游",//结束AC代码

Flex代码如下所示:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<body onload="MM_preloadImages('assets/index_main/images/nav-features-over.gif','assets/index_main/images/nav-signup-over.gif','assets/index_main/images/nav-pricing-over.gif')">
<div align="center">
  <table width="1024" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td height="500" bgcolor="#C2E8F3" class="pricingBG"><div align="center">
        <p>
          <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,1,0,0','width','1024','height','1850','src','cloud_tour','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','cloud_tour' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,1,0,0" width="1024" height="1850">
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
    backgroundColor="#FFFFFF" backgroundGradientColors="[#FFFFFF, #FFFFFF]"
    fontFamily="Arial" fontSize="13" width="1024" height="1850" verticalGap="20"
    verticalScrollPolicy="off" horizontalScrollPolicy="off"
    xmlns:controls="com.fxcomponentsWei.controls.*" xmlns:s="library://ns.adobe.com/flex/spark">
    <mx:Script>
        <![CDATA[           
            import mx.containers.Canvas;

            private const VIDEO_SRC_MY_FILES:String = 'assets/index_main/videos/my_files.flv';
            private const VIDEO_SRC_CALENDAR:String = 'assets/index_main/videos/calendar.flv';
            private const VIDEO_SRC_PROFILE_EXPLORER:String = 'assets/index_main/videos/profile_explorer.flv';
            private const VIDEO_SRC_GROUPS:String = 'assets/index_main/videos/groups.flv';

            private function handlePlay(e:Event):void
            {
                var cvs:Canvas = e.currentTarget.parent.parent as Canvas;
                var vid:VideoPlayer = cvs.getChildByName('vid') as VideoPlayer;
                vid.enabled = true;
                switch(e.currentTarget.data)
                {   //assign vid source
                    case 'my_files':                        
                        vid.source = VIDEO_SRC_MY_FILES;                                                                        
                        break;
                    case 'calendar':                        
                        vid.source = VIDEO_SRC_CALENDAR;                                                                        
                        break;
                    case 'profile_explorer':                        
                        vid.source = VIDEO_SRC_PROFILE_EXPLORER;                                                                        
                        break;
                    case 'groups':                          
                        vid.source = VIDEO_SRC_GROUPS;                                                                          
                        break;
                    default:
                        throw new Error('invalid video request');
                }
                cvs.removeChild(e.currentTarget.parent);    //remove play box button
            }

         ]]>
    </mx:Script>
    <s:VideoDisplay name="test" id="blah" width="320" height="160"
                    source="assets/index_main/videos/my_files.flv"/>
    <mx:Canvas width="500" height="300">
        <s:VideoPlayer name="vid" width="100%" height="100%" autoPlay="true" autoRewind="true"
            enabled="false"/>
        <mx:Box backgroundColor="#FFFFFF" width="100%" height="100%" backgroundAlpha="0.5"
            verticalAlign="middle" horizontalAlign="center">
            <mx:Image source="assets/index_main/images/play-128x128.png" click="handlePlay(event)"
                data="{'my_files'}" buttonMode="true" toolTip="click to play"/>
        </mx:Box>
    </mx:Canvas>    
    <mx:Text width="600">
        <mx:htmlText>
            <![CDATA[
<b>My Files</b>
Want the ability to access, share and manage files from wherever you happen to be, without having to invest in expensive technology or IT staff? Cloud makes it simple and affordable to store and manage all your digital content – from financial, creative and productivity documents to image, audio and video files – right from your laptop, your smartphone or any other web-enabled device.             
            ]]>
        </mx:htmlText>
    </mx:Text>
    <mx:Canvas width="500" height="300">
        <s:VideoPlayer name="vid" width="100%" height="100%" autoPlay="true" autoRewind="true"
         enabled="false"/>
        <mx:Box backgroundColor="#FFFFFF" width="100%" height="100%" backgroundAlpha="0.5"
            verticalAlign="middle" horizontalAlign="center">
            <mx:Image source="assets/index_main/images/play-128x128.png" click="handlePlay(event)"
                data="{'profile_explorer'}" buttonMode="true" toolTip="click to play"/>
        </mx:Box>
    </mx:Canvas>    
    <mx:Text width="600">
        <mx:htmlText>
            <![CDATA[
<b>Profile Explorer</b>
Connect other services to your profile, and keep in touch with all your friends in the Cloud and beyond. See what you're sharing with others, and what your friends are saying about you.               
            ]]>
        </mx:htmlText>
    </mx:Text>
    <mx:Canvas width="500" height="300">
        <s:VideoPlayer name="vid" width="100%" height="100%" autoPlay="true" autoRewind="true"
            enabled="false"/>
        <mx:Box backgroundColor="#FFFFFF" width="100%" height="100%" backgroundAlpha="0.5"
            verticalAlign="middle" horizontalAlign="center">
            <mx:Image source="assets/index_main/images/play-128x128.png" click="handlePlay(event)"
                data="{'calendar'}" buttonMode="true" toolTip="click to play"/>
        </mx:Box>
    </mx:Canvas>
    <mx:Text width="600">
        <mx:htmlText>
            <![CDATA[
<b>Calendar</b>
Organizing your schedule shouldn't be a burden. With the Cloud Calendar, it's easy to keep track of life's important events all in one place. You can invite other people to events on your calendar. Guests can RSVP to your events by email or via Cloud Calendar or Access your calendar however and whenever you want by syncing events with Microsoft Outlook, Apple iCal, Mozilla Sunbird or your smartphone.             
            ]]>
        </mx:htmlText>
    </mx:Text>
    <mx:Canvas width="500" height="300">
        <s:VideoPlayer name="vid" width="100%" height="100%" autoPlay="true" autoRewind="true"
            enabled="false"/>
        <mx:Box backgroundColor="#FFFFFF" width="100%" height="100%" backgroundAlpha="0.5"
            verticalAlign="middle" horizontalAlign="center">
            <mx:Image source="assets/index_main/images/play-128x128.png" click="handlePlay(event)"
                data="{'groups'}" buttonMode="true" toolTip="click to play"/>
        </mx:Box>
    </mx:Canvas>
    <mx:Text width="600">
        <mx:htmlText>
            <![CDATA[
<b>Groups</b>
Connect with the people you need to get the job done. Unlike other tools, Cloud Groups lets you work with anyone, whether they’re inside or outside the company firewall. Invite them into Cloud Groups to work together on projects, share files, assign tasks or catch up in real-time.               
            ]]>
        </mx:htmlText>
    </mx:Text>
</mx:Application>

我的档案
希望能够随时随地访问、共享和管理文件,而无需投资昂贵的技术或IT人员?云技术使您可以轻松、经济地存储和管理所有数字内容,从金融、创意和生产力文档到图像、音频和视频文件,这些内容可以直接从笔记本电脑、智能手机或任何其他支持web的设备上存储和管理。
]]>
配置文件浏览器
将其他服务连接到您的个人资料,并与云中及以外的所有朋友保持联系。看看你和别人分享了什么,你的朋友对你说了什么。
]]>
历法
安排你的日程不应该是一个负担。有了云日历,在一个地方就可以轻松记录生活中的重要事件。您可以邀请其他人参加日历上的活动。来宾可以通过电子邮件或云日历回复您的活动,也可以通过将活动与Microsoft Outlook、Apple iCal、Mozilla Sunbird或您的智能手机同步,随时随地访问您的日历。
]]>
组
与完成工作所需的人建立联系。与其他工具不同,云组允许您与任何人一起工作,无论他们在公司防火墙之内还是之外。邀请他们加入云计算小组,共同完成项目、共享文件、分配任务或实时跟进。
]]>
谢谢和问候
~Z~

我建议您使用将Flex swf嵌入html网站。粗略地看一下,您似乎缺少了需要设置为true的选项。

我建议您使用将Flex swf嵌入到html网站中。粗略地看一眼,似乎您缺少了需要设置为true的选项。

我尝试了这一点,并更新了代码。但我还是遇到了同样的错误。我试过了,还更新了代码。但我还是犯了同样的错误。