swfObject 2.2 allowFullScreen does not work
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开发者_如何学Python,
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?
It looks to me like you are missing one of the arguments to embedSWF (the expressinstall url)
swfobject.embedSWF( swfUrl,
id,
width,
height,
version,
expressInstallSwfurl,
flashvars,
params,
attributes,
callbackFn
);
精彩评论