You are not logged in.

1

Wednesday, April 8th 2009, 2:45pm

Javascript Fullscreen Function

Hi guys,

I'm new in this kind of panos, my experience is on java ptviewer, so i dont know the krpano basics.
My idea is to build a html krpano, so i'll need to execute veryous javascript functions.
How can i switch to the fullscreen mode with a JavaScript function call?

Many thanks,
myky

2

Wednesday, April 8th 2009, 3:13pm

My idea is to build a html krpano, so i'll need to execute veryous javascript functions.
this is possible, have a look at the javascript examples,


How can i switch to the fullscreen mode with a JavaScript function call?
an interesting question
it's only possible to change the fullscreen mode in follow of an user-interaction,
e.g. a mouse click or key press, this is an flash security feature,
maybe this can be faked with javascript but I don't know a solution for it...

3

Wednesday, April 8th 2009, 3:22pm

Hi Kclaus,

Thanks for your answer, i think i did not make myself clear.
I want to put a html button so the user can click an turn the pano into fullscreen mode.
Do you know any JS function that already makes that?

myky

nelk

Intermediate

Posts: 358

Location: Paris

  • Send private message

4

Wednesday, April 8th 2009, 3:42pm

Hi,

have a look here : http://www.krpano.com/examples/javascript2/

and add a function, something like

Source code

1
2
3
4
	function fullscreen()
	{
		krpano().call( "switch(fullscreen);" );
	}


should work
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

5

Wednesday, April 8th 2009, 3:43pm

I understand, but this is not possible trough the flash security limitations,
the user must click or press something in flash to switch to fullscreen

have a look here - in the security chapter, the third point:
http://www.adobe.com/devnet/flashplayer/…creen_mode.html

Graydon

Professional

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

6

Saturday, April 11th 2009, 6:41am

You can make a "button" that is within the krpano area that toggles fullscreen on/off as needed.

It would work the same as if you right clicked and selected fullscreen from that menu.