Skip to main content
Participant
January 17, 2008
Question

Detecting the "allowFullScreen" setting

  • January 17, 2008
  • 4 replies
  • 665 views
Hi,

Is there any way to detect the allowFullScreen param set in the html?

I want to detect if fullscreen is available and show/hide a fullscreen button accordingly.

Thanks
Anthony
This topic has been closed for replies.

4 replies

Participant
August 25, 2008
it may occure en error if allowScriptAccess is define on "Never". So, we must use something like that :

if(ExternalInterface.available){
try {
allowFullScreen = ExternalInterface.call("function(){return this.params['allowFullScreen']}");
}catch(e:Error) {
//trace(e)
allowFullScreen = "false";
}
if(allowFullScreen != "true"){
allowFullScreen = "false";
}

}
Participant
August 25, 2008
I finaly found a method that works great using ExternalInterface. Here is the code :

if(ExternalInterface.available){
allowFullScreen = ExternalInterface.call("function(){return this.params['allowFullScreen']}");
if(allowFullScreen != "true"){
allowFullScreen = "false";
}
}

of cause, it can be used with other parameters.

(Special thanks to Boomer for his help.)
acorcuttAuthor
Participant
January 22, 2008
No, it's easy enough to detect if the player is capable of fullscreen by just checking the version or availability of the stage.fullscreenRect... but still I can't determine if is allowed by the embed tag.

This is not a problem when I have control over the html, but sites like myspace block most of these tags so would be good if it could be determined so I can switch the button off.
January 21, 2008
Hey, did you ever get an answer to this?