First to use simpleviewer

  • Hi,

    I cut and paste a portion of the krpano sample of simpleviewer in pano0.xml and changed the pictures in the gallery.xml . On start, It works fine, showing and hiding the gallery.

    When I go to another pano (pano1) and then go back to pano0, and I click on the show/hide gallery icon, it does not respond, it does not show anything.

    Will you kindly give me what to tweak to make it work. I am using mackbook pro with os 10.6.4, krpano 1.0.8.11 and flash player 10. Best regards and thank you.

    Manny

  • i am not a programmer so i just paste the source code, generated by autopano tour, i hope it is readable: I do not have a web site. Thank you.

    part of pano0 = ac0.xml

    <hotspot name="spot2" onclick="action(closeglobalobjects);set(plugin[data].autorotate,get(autorotate.enabled));set(autorotate.enabled,false);loadpano(ac3.xml);set(autorotate.enabled,get(plugin[data].autorotate));" onhover="showtext(House);"url="acdata/graphics/spots/spot0.swf" ath="524.869" atv="0.285714"/>

    <!-- close all hotspots -->


    <!-- show and hide gallery buttons (show button is visible, hide button is invisible at start -->
    <plugin name="showgallery" url="showgallery.png" align="bottom" x="-240" y="20" visible="true" onclick="action(showgallery);" />
    <plugin name="hidegallery" url="hidegallery.png" align="bottom" x="-240" y="20" visible="false" onclick="action(hidegallery);" />


    <!-- a "empty" and hidden plugin for the simpleviewer -->
    <plugin name="gallery" url="" visible="false" />


    <!-- action to load and show the simpleviewer gallery -->
    <action name="showgallery">
    <!-- swap buttons -->
    set(plugin[showgallery].visible,false);
    set(plugin[hidegallery].visible,true);

    <!-- load the simpleviewer -->
    set(plugin[gallery].url,simpleviewer.swf?xmlDataPath=gallery.xml);
    set(plugin[gallery].visible,true);
    </action>



    <!-- action to hide the simpleviewer gallery -->
    <action name="hidegallery">
    <!-- swap buttons -->
    set(plugin[showgallery].visible,true);
    set(plugin[hidegallery].visible,false);

    <!-- hide simpleviewer -->
    set(plugin[gallery].visible,false);
    </action>
    </krpano>


    this is pano1 = pano (ac1.xml)


    <krpano version="1.0.8">
    <!-- actions to perform while loading -->
    <events onloadcomplete="plugin[combobox].selectitem(b00_acpool);playbackgroundsound(acdata/sounds/sound1.mp3,0);"/>
    <!--************** Panorama *******************************************************************-->
    <!--@File="ac1.xml" @PanoName="b00_acpool" @FilePath="/Users/manuelrosario/Documents/0MYACCESSFOLDER/38xACZ/actour/b00_acpool.tif"-->
    <panoview h="0" v="0" fov="90"/>
    <!-- view parameters -->
    <view fisheye="0" limitview="lookat" vlookatmin="-90" vlookatmax="90" maxpixelzoom="1.0" fovmax="90" fov="90" hlookat="0" vlookat="0"/>
    <autorotate horizon="0" tofov="90" speed="4"/>
    <!-- preview image -->


    <view fov="90" fovmin="60" fovmax="120" />

    <image type="CUBE" multires="true" tilesize="727" frames="1" frame="1">
    <level tiledimagewidth="4726" tiledimageheight="4726">
    <left url="b00_acpool.tiles/%f/l6/l_%0v_%0h.jpg" />
    <front url="b00_acpool.tiles/%f/l6/f_%0v_%0h.jpg" />
    <right url="b00_acpool.tiles/%f/l6/r_%0v_%0h.jpg" />
    <back url="b00_acpool.tiles/%f/l6/b_%0v_%0h.jpg" />
    <up url="b00_acpool.tiles/%f/l6/u_%0v_%0h.jpg" />
    <down url="b00_acpool.tiles/%f/l6/d_%0v_%0h.jpg" />
    </level>
    <level tiledimagewidth="2363" tiledimageheight="2363">
    <left url="b00_acpool.tiles/%f/l5/l_%0v_%0h.jpg" />
    <front url="b00_acpool.tiles/%f/l5/f_%0v_%0h.jpg" />
    <right url="b00_acpool.tiles/%f/l5/r_%0v_%0h.jpg" />
    <back url="b00_acpool.tiles/%f/l5/b_%0v_%0h.jpg" />
    <up url="b00_acpool.tiles/%f/l5/u_%0v_%0h.jpg" />
    <down url="b00_acpool.tiles/%f/l5/d_%0v_%0h.jpg" />
    </level>
    <level tiledimagewidth="1182" tiledimageheight="1182">
    <left url="b00_acpool.tiles/%f/l4/l_%0v_%0h.jpg" />
    <front url="b00_acpool.tiles/%f/l4/f_%0v_%0h.jpg" />
    <right url="b00_acpool.tiles/%f/l4/r_%0v_%0h.jpg" />
    <back url="b00_acpool.tiles/%f/l4/b_%0v_%0h.jpg" />
    <up url="b00_acpool.tiles/%f/l4/u_%0v_%0h.jpg" />
    <down url="b00_acpool.tiles/%f/l4/d_%0v_%0h.jpg" />
    </level>
    <level tiledimagewidth="591" tiledimageheight="591">
    <left url="b00_acpool.tiles/%f/l3/l_%0v_%0h.jpg" />
    <front url="b00_acpool.tiles/%f/l3/f_%0v_%0h.jpg" />
    <right url="b00_acpool.tiles/%f/l3/r_%0v_%0h.jpg" />
    <back url="b00_acpool.tiles/%f/l3/b_%0v_%0h.jpg" />
    <up url="b00_acpool.tiles/%f/l3/u_%0v_%0h.jpg" />
    <down url="b00_acpool.tiles/%f/l3/d_%0v_%0h.jpg" />
    </level>
    <level tiledimagewidth="296" tiledimageheight="296">
    <left url="b00_acpool.tiles/%f/l2/l_%0v_%0h.jpg" />
    <front url="b00_acpool.tiles/%f/l2/f_%0v_%0h.jpg" />
    <right url="b00_acpool.tiles/%f/l2/r_%0v_%0h.jpg" />
    <back url="b00_acpool.tiles/%f/l2/b_%0v_%0h.jpg" />
    <up url="b00_acpool.tiles/%f/l2/u_%0v_%0h.jpg" />
    <down url="b00_acpool.tiles/%f/l2/d_%0v_%0h.jpg" />
    </level>
    <level tiledimagewidth="148" tiledimageheight="148" aspreview="true">
    <left url="b00_acpool.tiles/%f/l1/l_%0v_%0h.jpg" />
    <front url="b00_acpool.tiles/%f/l1/f_%0v_%0h.jpg" />
    <right url="b00_acpool.tiles/%f/l1/r_%0v_%0h.jpg" />
    <back url="b00_acpool.tiles/%f/l1/b_%0v_%0h.jpg" />
    <up url="b00_acpool.tiles/%f/l1/u_%0v_%0h.jpg" />
    <down url="b00_acpool.tiles/%f/l1/d_%0v_%0h.jpg" />
    </level>
    </image>


    <!--************** Hotspots and lensflares ***************************************************-->
    <hotspot name="spot0" onclick="action(closeglobalobjects);set(plugin[data].autorotate,get(autorotate.enabled));set(autorotate.enabled,false);loadpano(ac2.xml);set(autorotate.enabled,get(plugin[data].autorotate));" onhover="showtext(Bridge);"url="acdata/graphics/spots/spot0.swf" ath="420.095" atv="0.285714"/>
    <hotspot name="spot1" onclick="action(closeglobalobjects);set(plugin[data].autorotate,get(autorotate.enabled));set(autorotate.enabled,false);loadpano(ac3.xml);set(autorotate.enabled,get(plugin[data].autorotate));" onhover="showtext(House);"url="acdata/graphics/spots/spot0.swf" ath="456.923" atv="0"/>
    <hotspot name="spot2" onclick="action(closeglobalobjects);set(plugin[data].autorotate,get(autorotate.enabled));set(autorotate.enabled,false);loadpano(ac0.xml);set(autorotate.enabled,get(plugin[data].autorotate));" onhover="showtext(Square);"url="acdata/graphics/spots/spot0.swf" ath="532.577" atv="2"/>
    <!-- close all hotspots -->


    <!-- close all hotspots -->
    </krpano>

  • I tried to insert keep="true" in:


    <!-- show and hide gallery buttons (show button is visible, hide button is invisible at start -->
    <plugin name="showgallery" url="showgallery.png" align="bottom" x="-240" y="20" visible="true" onclick="action(showgallery);" />
    <plugin name="hidegallery" url="hidegallery.png" align="bottom" x="-240" y="20" visible="false" keep="true" onclick="action(hidegallery);" />

    ....gallery still does not show, thank you very much Zephyr and Mindlessboss for your effort. I will try any suggestions. Thank you.

    Manny

  • Does it work in Pano1 when you first move from pano0 to pano1 when you have the keep="true"? If it does, try using a startup XML file that only contains the slideshow information and also

    <include url="pano0" />

    Be sure to remove any info from pano0 that refers to the slideshow.

    I think what is happening is when you return to the first page, simpleviewer tries to load a second player, and only one simpleviewer can be loaded. Of course this is just speculation.

  • This is a 4 panos. I will make just 2 panos with minimum functions just to include a simpleviewer so it will be easy to manipulate.

    The project name is "ac" so it will produce ac.html, ac.xml, ac0.xml and ac1.xml.

    I will try your suggestions and I will be back for any result. Thank you very much Jarredja.

    Manny

  • Hi,

    I made 2 panos only for simplicity. I put the simpleviewer in the startup xml (ac.xml) and it does not work still. Below are generated Autopano Tour 1.1 beta 9 and I inserted the simpleviewer routine. It works only on the first start and with the first pano (ac0), once you go to next pano (ac1) and go back to pano (ac0) then show/hide gallery is not working. Thank you.....Manny.

    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    AC.HTML

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Virtual Tour generated by Autopano Tour </title>
    <link rel="stylesheet" type="text/css" href= "default.css">
    </head>

    <body>
    <h1>Project : ac</h1>
    <div id="tour">
    <object width="640" height="480">
    <embed src="ac.swf" width="640" height="480" allowFullScreen="true">
    </embed>
    </object>
    </div>
    </body>
    </html>

    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    AC.XML

    <krpano version="1.0.8" logkey="false">
    <!--************** KrPano plugins and datas ***************************************************-->
    <plugin name="data" keep="true"/>
    <!--************** Open the first pano ********************************************************-->
    <include url="ac0.xml"/>
    <autorotate enabled="true"/>
    <!--************** Fonts **********************************************************************-->
    <textstyle name="DEFAULT" alpha="1" bold="false" font="Arial" fontsize="16" italic="false" textcolor="0xff000000"/>
    <!--************** Menu ***********************************************************************-->
    <plugin name="openfs" align="bottom" blendmode="screen" keep="true" onclick="set(fullscreen,true);" onout="set(blendmode,screen);" onover="set(blendmode,add);" url="acdata/graphics/menu/menu0.png" x="-20" y="10"/>
    <plugin name="closefs" align="bottom" blendmode="screen" keep="true" onclick="set(fullscreen,false);" onout="set(blendmode,screen);" onover="set(blendmode,add);" url="acdata/graphics/menu/menu1.png" visible="flase" x="-20" y="10"/>
    <events onenterfullscreen="set(plugin[openfs].visible,false); set(plugin[closefs].visible,true);" onexitfullscreen="set(plugin[openfs].visible,true); set(plugin[closefs].visible,false);"/>
    <plugin name="autorotation" align="bottom" blendmode="screen" keep="true" onclick="switch(autorotate.enabled);" onout="set(blendmode,screen);" onover="set(blendmode,add);" url="acdata/graphics/menu/menu2.png" x="20" y="10"/>
    <!--************** Pano list ******************************************************************-->
    <plugin name="combobox" url="acdata/graphics/combobox.swf" keep="true" align="righttop" x="10" y="10"/>
    <action name="combobox:ac0square">loadpano(ac0.xml,NULL,NULL,BLEND(1));</action>
    <action name="combobox:ac1house">loadpano(ac1.xml,NULL,NULL,BLEND(1));</action>
    <action name="closeglobalobjects"/>


    <!-- show and hide gallery buttons (show button is visible, hide button is invisible at start -->
    <plugin name="showgallery" url="showgallery.png" align="bottom" x="-240" y="20" visible="true" keep="true" onclick="action(showgallery);" />
    <plugin name="hidegallery" url="hidegallery.png" align="bottom" x="-240" y="20" keep="true" visible="false" onclick="action(hidegallery);" />


    <!-- a "empty" and hidden plugin for the simpleviewer -->
    <plugin name="gallery" url="" visible="false" />


    <!-- action to load and show the simpleviewer gallery -->
    <action name="showgallery">
    <!-- swap buttons -->
    set(plugin[showgallery].visible,false);
    set(plugin[hidegallery].visible,true);

    <!-- load the simpleviewer -->
    set(plugin[gallery].url,simpleviewer.swf?xmlDataPath=gallery.xml);
    set(plugin[gallery].visible,true);
    </action>



    <!-- action to hide the simpleviewer gallery -->
    <action name="hidegallery">
    <!-- swap buttons -->
    set(plugin[showgallery].visible,true);
    set(plugin[hidegallery].visible,false);

    <!-- hide simpleviewer -->
    set(plugin[gallery].visible,false);
    </action>


    </krpano>

    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    AC0,XML


    <krpano version="1.0.8">
    <!-- actions to perform while loading -->
    <events onloadcomplete="plugin[combobox].selectitem(ac0square);"/>
    <!--************** Panorama *******************************************************************-->
    <!--@File="ac0.xml" @PanoName="ac0square" @FilePath="/Users/manuelrosario/Documents/0MYACCESSFOLDER/42ACSimpleViewer2/ac0square.tif"-->
    <panoview h="0" v="0" fov="90"/>
    <!-- view parameters -->
    <view fisheye="0" limitview="lookat" vlookatmin="-90" vlookatmax="90" maxpixelzoom="1.0" fovmax="90" fov="90" hlookat="0" vlookat="0"/>
    <autorotate horizon="0" tofov="90" speed="4"/>
    <!-- preview image -->
    <preview url="acdata/ac0/preview.jpg"/>
    <!-- the pano itself -->
    <image type="CUBE">
    <left url="acdata/ac0/3.jpg"/>
    <front url="acdata/ac0/0.jpg"/>
    <right url="acdata/ac0/1.jpg"/>
    <back url="acdata/ac0/2.jpg"/>
    <up url="acdata/ac0/4.jpg"/>
    <down url="acdata/ac0/5.jpg"/>
    </image>
    <!--************** Hotspots and lensflares ***************************************************-->
    <!-- close all hotspots -->

    </krpano>

    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    AC1.XML


    <krpano version="1.0.8">
    <!-- actions to perform while loading -->
    <events onloadcomplete="plugin[combobox].selectitem(ac1house);"/>
    <!--************** Panorama *******************************************************************-->
    <!--@File="ac1.xml" @PanoName="ac1house" @FilePath="/Users/manuelrosario/Documents/0MYACCESSFOLDER/42ACSimpleViewer2/ac1house.tif"-->
    <panoview h="0" v="0" fov="90"/>
    <!-- view parameters -->
    <view fisheye="0" limitview="lookat" vlookatmin="-90" vlookatmax="90" maxpixelzoom="1.0" fovmax="90" fov="90" hlookat="0" vlookat="0"/>
    <autorotate horizon="0" tofov="90" speed="4"/>
    <!-- preview image -->
    <preview url="acdata/ac1/preview.jpg"/>
    <!-- the pano itself -->
    <image type="CUBE">
    <left url="acdata/ac1/3.jpg"/>
    <front url="acdata/ac1/0.jpg"/>
    <right url="acdata/ac1/1.jpg"/>
    <back url="acdata/ac1/2.jpg"/>
    <up url="acdata/ac1/4.jpg"/>
    <down url="acdata/ac1/5.jpg"/>
    </image>
    <!--************** Hotspots and lensflares ***************************************************-->
    <!-- close all hotspots -->

    </krpano>

  • HI Manny,

    Just a thought, but looking at the code above, i think AC is your global xml (one with all the buttons and gallery to appear in the panoramas) and AC0, AC1, AC2 are you panorama xml's, so remove <include url="ac0.xml"/> from AC.xml and instead put <include url="ac.xml"/> into your AC1, AC0, and AC2 etc.

    best wishes,

    tom

  • Hi Tom,

    That was my first attempt, I placed it in AC0.xml, but then it did not work, I am not sure if Jarredja's suggestion is to put it on the startup xml (ac.xml), so I did and did not work either. Thank you very much and I will try with some suggestions to come...Best regards,

    Manny

Participate now!

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