js调用flex4 中的fullscr(全屏)方法,报错 - flex-javascript 20
html:<inputtype="button"/>functioncallflex(){varobj=document.getElementById("FlashObj...
html:
<input type="button"/>
function callflex() {
var obj = document.getElementById("FlashObj");
try {
obj.fullScr();
}
catch (e) {
alert(e);
}
}
增加了:
<param name=""allowFullScreen"" value=""true"" />
flex4:
初始化
creationComplete="CreationComplete()"
代码:
private function CreationComplete():void
{
ExternalInterface.addCallback("fullScr", fullScr);
}
private function fullScr():void
{
this.stage.displayState=StageDisplayState.FULL_SCREEN;
}
报错:
SecurityError: Error #2152: Full screen mode is not allowed.
如果直接在flex4 内部调用fullScr方法则没问题。为什么呢 展开
<input type="button"/>
function callflex() {
var obj = document.getElementById("FlashObj");
try {
obj.fullScr();
}
catch (e) {
alert(e);
}
}
增加了:
<param name=""allowFullScreen"" value=""true"" />
flex4:
初始化
creationComplete="CreationComplete()"
代码:
private function CreationComplete():void
{
ExternalInterface.addCallback("fullScr", fullScr);
}
private function fullScr():void
{
this.stage.displayState=StageDisplayState.FULL_SCREEN;
}
报错:
SecurityError: Error #2152: Full screen mode is not allowed.
如果直接在flex4 内部调用fullScr方法则没问题。为什么呢 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询