<image syntax problem with html5

  • Hi

    Encountered a strange problem as follows, I'm using the following xml to load a scene:

    <scene name="pano35" title="Hotel Entrance " onstart="showname(); set (current-scene,pano35);">

    <view limitview="range" hlookat="0" hlookatmin="-180" hlookatmax="180" vlookat="0" vlookatmin="-65" vlookatmax="65"

    fovtype="MFOV" fovmax="85" maxpixelzoom="2.0" />


    <preview url="../images/preview/pano35_preview.jpg" />


    <image >
    <left url="../images/pc-med-res/%$current-scene%_l.jpg" />
    <front url="../images/pc-med-res/%$current-scene%_f.jpg" />
    <right url="../images/pc-med-res/%$current-scene%_r.jpg" />
    <back url="../images/pc-med-res/%$current-scene%_b.jpg" />
    <up url="../images/pc-med-res/%$current-scene%_u.jpg" />
    <down url="../images/pc-med-res/%$current-scene%_d.jpg" />
    </image>

    This works fine with flash, but if I disable flash in browser and use html5 instead (or view on ipad, iphone, android etc) then get:

    ERROR: loading of xml/../images/pc-med-res/%$current-scene%_l.jpg failed!

    which gets repeated for each pano 'face'. so the variable 'current-scene' is not being translated.

    Note if I hard code the file name ie xml/../images/pc-med-res/pano35_l.jpg then it works fine in html5.

    Any ideas, fixes much appreciated.

    Thanks
    Tim

  • Hi Klaus

    Thanks for the response. My next question, any way of reducing/simplifying the number of lines when defining the cube faces to load for different devices:


    <!-- ** pano44 - Deluxe Double ********************************************************************* -->


    <scene name="pano44" title="Deluxe Double " onstart="showname(); ">

    <view limitview="range" hlookat="40" hlookatmin="-180" hlookatmax="180" vlookat="10" vlookatmin="-90" vlookatmax="65"
    fovtype="MFOV" fovmax="85" maxpixelzoom="2.0" />


    <preview url="../images/preview/pano44_preview.jpg" />


    <image devices="Desktop">
    <left url="../images/pc-med-res/pano44_l.jpg" />
    <front url="../images/pc-med-res/pano44_f.jpg" />
    <right url="../images/pc-med-res/pano44_r.jpg" />
    <back url="../images/pc-med-res/pano44_b.jpg" />
    <up url="../images/pc-med-res/pano44_u.jpg" />
    <down url="../images/pc-med-res/pano44_d.jpg" />
    </image>


    <image devices="Mobile">
    <left url="../images/iphone/pano44_l.jpg" />
    <front url="../images/iphone/pano44_f.jpg" />
    <right url="../images/iphone/pano44_r.jpg" />
    <back url="../images/iphone/pano44_b.jpg" />
    <up url="../images/iphone/pano44_u.jpg" />
    <down url="../images/iphone/pano44_d.jpg" />
    </image>


    <image devices="Tablet">
    <left url="../images/ipad/pano44_l.jpg" />
    <front url="../images/ipad/pano44_f.jpg" />
    <right url="../images/ipad/pano44_r.jpg" />
    <back url="../images/ipad/pano44_b.jpg" />
    <up url="../images/ipad/pano44_u.jpg" />
    <down url="../images/ipad/pano44_d.jpg" />
    </image>

    Thanks
    Tim

  • I would advise you to put one or two panos on the/a make vtour droplet and see what the syntax is in the xml.

    Tuur *thumbsup*

  • Hi Tuur, Klaus

    As per Tuur's suggestion I had a look at the examples, so am now using:


    <preview url="../images/preview/pano13_preview.jpg" />


    <image devices="Desktop">
    <cube url="../images/pc-med-res/pano13_%s.jpg" />
    </image>


    <image devices="Mobile">
    <cube url="../images/iphone/pano13_%s.jpg" />
    </image>


    <image devices="Tablet">
    <cube url="../images/ipad/pano13_%s.jpg" />
    </image>

    which reduces the number of lines.

    thanks for your help.

    Tim

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!