flashplayer9的全屏模式
1,全屏下 Flash 文本框无法输入.
2,AS2 中一句话来调用全屏:
Stage["displayState"] = "fullScreen";
但必须使用事件处理器来调用才生效.就是:onPress,onClick...之类的.
3,最后就是HTML中必须加入 <param name="allowFullScreen" value="true" />这段话.
//例子
有用的Flash AS脚本(设置全屏与右键菜单)
// Action script...
// [Action in Frame 1]
function fuscreen()
{
Stage.displayState = "fullScreen";
} // 设置全屏
function exscreen()
{
Stage.displayState = "normal";
} // 退出全屏
function noscale()
{
Stage.scaleMode = "noScale";
} // 无缩放(显示源Flash尺寸)
function fullmode()
{
Stage.scaleMode = "showAll";
} // 显示全部(根据屏幕来适应大小)
function menuHandler(obj, menuObj)
{
if (Stage.displayState == "normal")
{
menuObj.customItems[0].enabled = true;
menuObj.customItems[1].enabled = false;
}
else
{
menuObj.customItems[0].enabled = false;
menuObj.customItems[1].enabled = true;
}
} // 设置右键菜单属性的函数(有热区与无热区)
demo.loadMovie("demo.swf");
Stage.scaleMode = "noScale";
fscommand("fullscreen", "true");
fscommand("allowscale", "false");
back_mc.onRelease = function ()
{
fuscreen();
};
var fullscreen = new ContextMenu(menuHandler);
fullscreen.hideBuiltInItems();
var fs = new ContextMenuItem("开启全屏", fuscreen);
fullscreen.customItems.push(fs);
var xfs = new ContextMenuItem("退出全屏", exscreen);
fullscreen.customItems.push(xfs);
var ns = new ContextMenuItem("无缩放", noscale);
ns.separatorBefore = true;
fullscreen.customItems.push(ns);
var sa = new ContextMenuItem("全部显示", fullmode);
fullscreen.customItems.push(sa);
this.menu = fullscreen;