(SOLVED)Scaling trouble embed tour into website - please help

  • This below and https://krpano.com/docu/html/#top works fine but i experience scaling trouble with for instance the thumbs layers.
    If not embedded it look perfekt on both iPad/ iphone desktop etc.

    Please advice *cry*


    <object width="100%" height="100%"> <embed src="http://WWW.MY-DOMAIN.COM/VIRTUAL_TOUR/MY-TOUR.SWF" width="100%" height="100%" allowFullScreen="true"> </embed> </object>


    Best regards - Stefan

    Einmal editiert, zuletzt von Stefan.L (20. Februar 2013 um 15:02)

  • Hi,


    Thank you for your reply!

    All this info is in the virtualtour.html straight out of the, by the PTP rendered tour. Everything works perfekt after updated plugins to latest version.
    To tell you the truth i can´t figure out how to use this (I should be able to figure out)


    <script>

    embedpano({swf:"pano.swf", xml:"pano.xml", target:"pano"});
    </script>

    or why it is not scaling well with, perhaps it have to be put inside a fixed div?


    <
    object width="100%" height="100%"> <embed src="http://WWW.MY-DOMAIN.COM/VIRTUAL_TOUR/MY-TOUR.SWF" width="100%" height="100%" allowFullScreen="true"> </embed> </object>

    Best regards - Stefan

  • Hi,

    or why it is not scaling well with, perhaps it have to be put inside a fixed div?

    sorry, I don't understand...

    <object width="100%" height="100%"> <embed src="http://WWW.MY-DOMAIN.COM/VIRTUAL_TOUR/MY-TOUR.SWF" width="100%" height="100%" allowFullScreen="true"> </embed> </object>

    Such flash-only fallback code should be not necessary and I would not recommend to use it.

    Best regards,
    Klaus

  • hmm ok it is not only swf as the link i pasted - i change the .swf to html - with scaling trouble.

    What i want to do is to embed a virtualtour (made by ppt) into a wordpress site.


    This is what am trying with this. Good or bad:)


    <div class="testing">
    <object width="100%" height="100%"> <embed src="http://tours.website.se/bmw/bmw.html" width="100%" height="100%" allowFullScreen="true"> </embed> </object>
    </div>

    Best regards - Stefan

    Einmal editiert, zuletzt von Stefan.L (19. Februar 2013 um 17:52)

  • Hi,

    that code here is totally wrong:

    Code
    <object width="100%" height="100%"> <embed src="http://tours.website.se/bmw/bmw.html" width="100%" height="100%" allowFullScreen="true"> </embed> </object>


    the <object>/<embed> html tags are for embedding plugins, to include an html page, the <iframe> element would need to be used - but with iframes the scaling is not controllable!

    Try that:

    Code
    <script src="http://WWW.MY-DOMAIN.COM/swfkrpano.js"></script>
    
    
    <div id="pano" style="width:640px; height:400px;"></div>
    
    
    <script>
      embedpano({swf:"http://WWW.MY-DOMAIN.COM/krpano.swf", xml:"pano.xml", target:"pano"});
    </script>

    Best regards,
    Klaus

  • Much better!!

    Works in flash and looks fine!

    Ios - not working (fatal error virtualtour.xml - loading failed! (404) - i have tried with the full link also. (loading or parsing failed)
    Firefox mac html5 - asks for flash install.

    Everything look fine in source and the panos (without embedding) works fine on both ios and html5 desktop) I have written all correct.

    What am i doing wrong:( A "devices" thing perhaps?

    Best regards - Stefan

    Einmal editiert, zuletzt von Stefan.L (19. Februar 2013 um 19:26)

  • Right, HTML5 is a problem in this case...

    For 'security reasons' the browsers don't allow loading XML files from other domains without additional server-side settings. The 'Access-Control-Allow-Origin header would need to be sent from your server.

    If you are using an Apache web server, you could try uploading a file named '.htaccess' with the following content to your server:

    Code
    Header set Access-Control-Allow-Origin *

    The other and more-reliable and recommend solution would be loading all files to the domain where they should be displayed.

    Best regards,
    Klaus

  • ok Just tried with the access, with the asterix right? Header set Access-Control-Allow-Origin *

    I have the website on http://www.website.se and the panofiles on tours.website.se

    So that is not a good solution. i where planning to put panos on a subdomain but i guess i have to rethink that....

    Best regards - Stefan

  • Alright - I moved the pano to the same webserver with out any luck - then i added Header set Access-Control-Allow-Origin * to the access file and now it works. Now it works on the subdomain as well. Goodness! Maybe better to skip embedding if my webserver cant handle this...
    Are there any downsides with this? Safe?

    Thank you very much for you replies Klaus - cheers!

    Best regards - Stefan

Jetzt mitmachen!

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