don't load this xml if iphone ?

  • Maybe isiphone

    Look at the usage of it in the virtual tour XML. I assume you could set visibility to false if it is an iPhone.

    Edit: Rereading your post, your idea would be great if that could be implemented by not loading an xml

    Edit#2; ISPHONE NOT ISIPHONE

    I wonder if we could only include it using isflash.

    variable names (read only) type default value
    isphone
    ispad
    isandroid
    isflash
    ishtml5

    Device detection variables. Check them with the if action.
    •iphone - true only on the iPhone 3/4 (and iPod Touch)
    •ipad - true only on the iPad
    •android - true only on a Android device
    •flash - true only in the Flashplayer (Desktop and Android)
    •html5 - true only in the krpanoJS (HTML5) viewer

    Edited once, last by Jarredja (November 13, 2010 at 3:13 PM).

  • Hi,

    I think you have to use the new devices setting for plugin and hotspot elements...

    • The hotspots and plugin images can use automatically an alternative image when running in the krpanoJS viewer. Therefore there is the new alturl setting in the xml. For example - to use an animtated gif instead of an animtated flash as hotspot.
    • Addtional there is also an alternative scaling (altscale) and an alternative onloaded event (altonloaded) to set alternative settings.
    • The use/display an certain plugin or hotspot element only on specific device then new devices setting can be used.

    Using this new devices setting, you can decide what it is displayed or not on each possible device....

    So, perhaps something like:

    Code
    <plugin name="in"  devices="flash|html5|ipad|android|desktop|tablet"  .... />

    Hope this help...

    SAlut.

  • Thanks for that Michel. I had not noticed the big 500. *whistling*

    I have a work around, I believe. If you have a setup like Michel provided in another post, you could do something like this.


    <krpano version="1.0.8" onstart="if(isflash , do_isflash() ); " >

    <action name="do_isflash">
    loadpano(tour1.xml, null, keepplugins, blend(0));

    </action>


    One note, change the attributes for the loadpano action as you wish, I just grabbed that from a sample.

    You would have to duplicate your xml (AND add the include statement in this file instead of the other) but it would give you the results you are wanting and it should only be necessary in the first xml file.

    Point of interest: ( I didn't realize this for quite a while and had severly bloated xml files for quite some time)

    If you used the keep="true" for the skins.xml in the first xml, you don't need it in any futher xml files. It is carried over.

  • hi guys,
    Tried to scale up my hotspots on an ipod with this example code,..i had no luck with the "mul" call that worked in Klaus's example..............once I added altscale i was fine,....also ,,is there a way to hide the address bar in an ipod (using my sons),...or to force a fulll screen that hides the address bar, it seemed to be hidden in klaus video. Thanks.
    Rob


    <!-- hotspot styles (for Flash and HTML5) -->
    <style name="hotspot_ani_black"
    url="hotspots/hotspot_ani_black_64x64x20.png"
    crop="0|0|64|64"
    frames="20" framewidth="64" frameheight="64" frame="0"
    onloaded="hotspot_animate();"
    altonloaded="if(isphone, mul(scale,4)); onloaded();"
    />

    <style name="hotspot_ani_white"
    url="hotspots/hotspot_ani_white_64x64x20.png"
    crop="0|0|64|64"
    frames="20" framewidth="64" frameheight="64" frame="0"
    onloaded="hotspot_animate();"
    altonloaded="if(isphone, mul(scale,4)); onloaded();"
    />

    <style name="alt_hotspot_ani_black"
    alturl="hotspots/hotspot_ani_black_64x64x20.png"
    frames="20" framewidth="64" frameheight="64" frame="0"
    altonloaded="set(crop,'0|0|64|64'); resetsize(); set(alpha,1.0); if(isphone, mul(scale,4)); hotspot_animate();"
    />

    <style name="alt_hotspot_ani_white"
    alturl="hotspots/hotspot_ani_white_64x64x20.png"
    frames="20" framewidth="64" frameheight="64" frame="0"
    altonloaded="set(crop,'0|0|64|64'); resetsize(); set(alpha,1.0); if(isphone, mul(scale,4)); hotspot_animate();"
    />

    <action name="hotspot_animate">
    inc(frame,1,get(frames),0);
    mul(ypos,frame,frameheight);
    txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));
    delayedcall(0.03, hotspot_animate() );
    </action>

  • here's what i'm using

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
    <title>Harborside</title>
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    </head>
    <body>
    <script src="swfobject/swfkrpano.js"></script>
    <div id="panoDIV" style="height:100%;">
    <script>
    embedpano({target:"panoDIV",swf:"itest.swf",width:"100%",height:"100%",allowFullScreen:"true"});
    </script>
    <noscript>
    <div id="tour">
    <object width="100%" height="100%">
    <embed src="itest.swf" width="100%" height="100%" allowFullScreen="true">
    </embed>
    </object>
    </div>
    </noscript>
    </div>
    </body>
    </html>

  • Hi,

    the automatic url hiding will only work when the pano is 'fullscreen',
    that means when it really fills the whole visible space,

    in your example have you have the default html body margin,

    add:

    Code
    <style>
      body{margin:0;padding:0;}
    </style>

    to make it real fullscreen, then the url hidding will work,

    best regards,
    Klaus

  • Hi,

    on the iPad it's not possible to hide the url,

    on the iPhone the url bar is a part of html page, so it can be hidden by scrolling it out,
    but on the iPad the url bar is a normal safari UI element,

    for real fullscreen on the iPad you could use alternative fullscreen browsers from the AppStore,

    best regards,
    Klaus

Participate now!

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