FLASH游戏如何全屏?
以下方法可以实现flash游戏全屏:
1. 将全屏按钮添加到flash游戏中,点击此按钮将游戏切换到全屏模式。
2. 编辑flash游戏代码,添加以下代码:
stage.displaystate = stagedisplaystate.full_screen;
这将使游戏切换到全屏模式。
3. flash游戏用html代码嵌入网页,并将其设置为全屏模式。例如:
<object width="100%" height="100%" type="application/x-shockwave-flash" data="game.swf">
<param name="movie" value="game.swf">
<param name="allowfullscreen" value="true">
</object>
其中,alllowfulscren参数设置为true后,用户可以点击flash游戏的全屏按钮或按下esc键退出全屏模式。
注:支持flash的浏览器越来越少,建议使用html5和javascript等其他技术开发游戏。
0