温馨提示:您的每一次转载,体现了我写此文的意义!!!烦请您在转载时注明出处http://www.blogjava.net/sxyx2008/谢谢合作!!!

雪山飞鹄

温馨提示:您的每一次转载,体现了我写此文的意义!!!烦请您在转载时注明出处http://www.blogjava.net/sxyx2008/谢谢合作!!!

BlogJava 首页 新随笔 联系 聚合 管理
  215 Posts :: 1 Stories :: 674 Comments :: 0 Trackbacks
        近期项目使用flex3实现,一年多没用了,突然用到这玩意,感觉有点陌生了。今天要用代码实现flex3的全屏模式。这里有几个步骤需要注意:
        修改html-template目录下的index.template.html文件,注意添加或修改红色字体部分
        第一处:
AC_FL_RunContent(
        
"src""playerProductInstall",
        
"FlashVars""MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
        
"width""${width}",
        
"height""${height}",
        
"align""middle",
        
"id""${application}",
        
"quality""high",
        
"bgcolor""${bgcolor}",
        
"name""${application}",
        
"allowFullScreen","true",
        
"type""application/x-shockwave-flash",
        
"pluginspage""http://www.adobe.com/go/getflashplayer"
    );
        第二处:
AC_FL_RunContent(
            
"src""${swf}",
            
"width""${width}",
            
"height""${height}",
            
"align""middle",
            
"id""${application}",
            
"quality""high",
            
"bgcolor""${bgcolor}",
            
"name""${application}",
            
"allowFullScreen","true",
            
"type""application/x-shockwave-flash",
            
"pluginspage""http://www.adobe.com/go/getflashplayer"
    );
        第三处:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
            id
="${application}" width="${width}" height="${height}"
            codebase
="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
            
<param name="movie" value="${swf}.swf" />
            
<param name="quality" value="high" />
            
<param name="bgcolor" value="${bgcolor}" />
            
<param name="allowScriptAccess" value="sameDomain" />
            
<embed src="${swf}.swf" quality="high" bgcolor="${bgcolor}"
                width
="${width}" height="${height}" name="${application}" align="middle"
                play
="true"
                loop
="false"
                quality
="high"
                allowFullScreen="true"

                type
="application/x-shockwave-flash"
                pluginspage
="http://www.adobe.com/go/getflashplayer">
            
</embed>
    
</object>

         最后:

全屏AS代码:

stage.displayState=StageDisplayState.FULL_SCREEN;

退出全屏AS代码:

stage.displayState=StageDisplayState.NORMAL;
posted on 2011-03-01 13:40 雪山飞鹄 阅读(2262) 评论(1)  编辑  收藏 所属分类: flex

Feedback

# re: Flex3全屏效果实现 2011-03-01 17:29 baby stroller
都是代码,不是很看得懂啊  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: