Topic: Detect the Fullscreen on/off action ?

Hi,

I am performing some size calculation when loading/resizing the browser to maintain the gallery the site I want it.

However when exiting the the full screen version of simpleviewer and coming back to the "normal" mode it is throwing off my calculation. I can fix it easily, but I need to "know" when to launch the calculation... but I can't figure any way to trigger my code when exiting full screen mode ? (either escape key or button click)

Any help on that ?

Thanks

Alex

Re: Detect the Fullscreen on/off action ?

bump ?

Re: Detect the Fullscreen on/off action ?

I do not believe there is a way to listen for exiting the full screen mode at this point in time.

Mike Richards
SimpleViewer Support Team.

Re: Detect the Fullscreen on/off action ?

Urgh.. oki sad
thanks anyway.

Alex

Re: Detect the Fullscreen on/off action ?

Are you talking about detecting fullscreen when SimpleViewer is loaded into a container SWF? If so you need to add the following ActionScript code to the container SWF:

stage.addEventListener(Event.FULLSCREEN,onFullscreenChange,false,0,true);

private function onFullscreenChange(e:Event):void{
  if (stage.displayState == "fullScreen"){
    //do something
  }else{
    //do something else
  }
}
Felix Turner
SimpleViewer Support Team.

Re: Detect the Fullscreen on/off action ?

No unfortunately I am not loading SW through a SWF but directly from html.

Alex

Re: Detect the Fullscreen on/off action ?

To access this via JavaScript, like you would like to do, you would need to load SimpleViewer into another swf that you could use to pass the info along with external interface to the JavaScript. But as I said before, at this point there is not direct way to access this via the SimpleViewer JS API.

ActionScript:

ExternalInterface.call("theJSFunction",theVarToPass);

(Sorry if I was not clear in my previous post, but I knew you were dealing with JavaScript form your other posts.)

Mike Richards
SimpleViewer Support Team.