Hi!
How to use Up-Down-Left-Right keys immediately panorama loading?
If I play my panorama in the Adobe Flash Player without browser I can use arrows keys immediately. But if I play my panorama in browser (IE or FF or...) I need to click panorama ("pano" div in the HTML page) before using the keyboard.
How to set keyboard activity to "pano" div automatically? It is possible?
How to use keyboard immediately panorama loading?
-
-
You can test it with an javascript-focus to the div container.
<script language="javascript">document.getElementById("panodiv").focus()</script>
-
Thanks for attention to my problem. But this javascript don't work.
I tried to add in the standard "tour.html" file <script language="javascript">document.getElementById("pano").focus()</script> and getElementByName and getURL("java script:tour.focus();"); and several other variants... And I have no working results -
Hi Valentin,
Interesting ...
iceman_fx was in the right path ... But it was focusing the div element that contains krpano instead of focusing krpano itself ...
<script language="javascript">document.getElementById("panodiv").focus()</script>
should be:
<script language="javascript">document.getElementById("krpanoSWFObject").focus()</script>But before focusing krpano, we need to make sure that it's ready (a reference from Klaus here )...
So, I think you can do that in this way...
inside your xml:
....
inside your html:Code
Alles anzeigen.... <script src="../../../swfkrpano.js"></script> <script> // <![CDATA[ embedpano({swf:"../../../krpano.swf", id:"krpanoSWFObject", xml:"pano1.xml", target:"krpanoDIV", width:"516", height:"300"}); ..... function krpanofocus() { var krpano = document.getElementById("krpanoSWFObject"); krpano.focus(); } // ]]> </script> .....
Thank you Valentin and iceman_fx for focus in this topic .
SAlut...
-
Hi michel,
Thank you very much!
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!