swfObject 2.2 allowedFullScreen 不起作用
开发一个带有 Flash Intro 的 ASP MVC 站点,遇到一个奇怪的行为:无法进入全屏(在任何浏览器中)。 Flex应用程序有这个脚本进入全屏(AS3):
private function FullScreenOn(event:Event):void {
this.stage.displayState = StageDisplayState.FULL_SCREEN;
}
并且加载swfObject(2.2)的HTML页面有(除其他外)这个代码:
<script type="text/javascript">
var flashvars = {};
flashvars.foo = "bar";
var params = {};
params.allowfullscreen = "true";
var attributes = {};
swfobject.embedSWF( "<%=Url.Content("~/Assets/PlayAround.swf")%>",
"Intro",
"100%",
"100%",
"9.0.28",
flashvars,
params,
attributes
);
</script>
AFAIK这应该可以工作!但我收到一条错误消息,指出
SecurityError: Error #2152: 不允许全屏模式。
我缺少什么?
Developing an ASP MVC site which has a Flash Intro and encountered a strange behavior: it is impossible to go into full screen (in any browser).
Flex application has this script to go in full screen (AS3):
private function FullScreenOn(event:Event):void {
this.stage.displayState = StageDisplayState.FULL_SCREEN;
}
and the HTML page which loads swfObject (2.2) has (amongst others) this code:
<script type="text/javascript">
var flashvars = {};
flashvars.foo = "bar";
var params = {};
params.allowfullscreen = "true";
var attributes = {};
swfobject.embedSWF( "<%=Url.Content("~/Assets/PlayAround.swf")%>",
"Intro",
"100%",
"100%",
"9.0.28",
flashvars,
params,
attributes
);
</script>
AFAIK this should work! but i'm getting an error stating
SecurityError: Error #2152: Full screen mode is not allowed.
What am i missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,您缺少 embedSWF 的参数之一(expressinstall url)
It looks to me like you are missing one of the arguments to embedSWF (the expressinstall url)