How to use keyboard immediately panorama loading?

  • 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?

    Einmal editiert, zuletzt von Valentin (19. September 2011 um 22:59)

  • 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 *sad*

  • Hi Valentin,

    Interesting *smile* ...
    iceman_fx was in the right path *thumbup* ... But it was focusing the div element that contains krpano instead of focusing krpano itself *wink* ...
    <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:

    Code
    <krpano onstart="js( krpanofocus() );">
    	....
    </krpano>


    ....
    inside your html:

    Thank you Valentin and iceman_fx for focus in this topic *g* .

    SAlut...

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!