我试图简单地为我的flash电影添加全屏功能。 我在舞台上创建了一个按钮(root> setfullscreen)并在root上添加了该代码:
var isfullscreen=false;
setfullscreen.addEventListener(MouseEvent.CLICK, SetFullscreen);
function SetFullscreen(event:MouseEvent):void
{
if (isfullscreen)
stage.displayState = StageDisplayState.NORMAL;
else
stage.displayState = StageDisplayState.FULL_SCREEN;
isfullscreen=!isfullscreen;
trace(isfullscreen);
}
我加载瑞士法郎:
<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'
codebase='http://macromedia.com/cabs/swflash.cab#version=6,0,0,0'
ID=flaMovie>
<PARAM NAME="movie" VALUE='movie.swf'>
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="allowfullscreen" VALUE="true">
<EMBED src='movie.swf'
style='width:800px;height:560px'
TYPE='application/x-shockwave-flash'>
</EMBED>
</OBJECT>
我没有找到任何其他事情要做,但它不起作用,单击按钮时没有任何反应,只有在flash中测试电影时从true切换为false的曲线。
答案 0 :(得分:0)
我相信您还需要将allowFullScreen添加到embed标记中:
{{1}}