You are not logged in.

> The forum rules have been updated. Please take a moment to read them.


#1 2011-12-30 18:03:50

piripino
New member
Registered: 2011-12-30
Posts: 3

editing the basic profile

Hi all

I'm editing the Basic theme to create a personal style. In particular I'm trying to modify the action linked to the "home" button that brings up the initial view of a panorama according to this code in the xml file:

Code:

<plugin name="home" 
            url="$(STYLEDIR)/btn_home.png"
            width="40"
            height="prop"
            customColor="true"
            keep="true"
            align="bottom"
            x="130"    
            y="10"
            onclick="lookto(get(panoview.h),get(panoview.v),get(panoview.fov),smooth(100,20,50));"
            crop="0|0|$(MENU_RESOURCE_WIDTH)|$(MENU_RESOURCE_WIDTH)" 
            onovercrop="0|$(MENU_RESOURCE_WIDTH)|$(MENU_RESOURCE_WIDTH)|$(MENU_RESOURCE_WIDTH)" 
            onover=""
            onout=""
    />

I'd like this button to restart the whole tour from the beginning: is there any action code  I can put in the onclick field?

thanks for help

Offline

 

#2 2012-01-03 11:25:11

bdd
Administrator
Registered: 2011-01-18
Posts: 622
Website

Re: editing the basic profile

Hello,

There is a way to do it but it needs the file name of the tour. And more it acts as if the first panorama displayed in the tour is the first one in PanotourPro.
So it is not a valid solution if you change the file name from a tour to another, and if you want a specific panorama to be the first displayed one.

For example, if you always create tours with the following filename : piripino.swf , then the "home" plugin in the menu description file will be :

Code:

<plugin name="home" 
            url="$(STYLEDIR)/btn_home.png"
            width="40"
            height="prop"
            customColor="true"
            keep="true"
            align="bottom"
            x="130"    
            y="10"
            onclick="mainloadpano(piripino0.xml);"
            crop="0|0|$(MENU_RESOURCE_WIDTH)|$(MENU_RESOURCE_WIDTH)" 
            onovercrop="0|$(MENU_RESOURCE_WIDTH)|$(MENU_RESOURCE_WIDTH)|$(MENU_RESOURCE_WIDTH)" 
            onover=""
            onout=""
    />

Gérald

Offline

 

#3 2012-01-03 18:49:13

piripino
New member
Registered: 2011-12-30
Posts: 3

Re: editing the basic profile

thanks for reply but your solutions doesn't work: this simply reloads the first panorama, but map and thumbnails are closed. I'd like everithing reloads from the beginning

the only thing seems to work is onclick="loadpano(virtualtour.xml);" but it opens with map hotspots hidden...

Last edited by piripino (2012-01-03 18:54:02)

Offline

 

#4 2012-01-03 19:18:54

gkaefer
Member
From: Salzburg
Registered: 2009-06-09
Posts: 2711
Website

Re: editing the basic profile

piripino wrote:

thanks for reply but your solutions doesn't work: this simply reloads the first panorama, but map and thumbnails are closed. I'd like everithing reloads from the beginning

the only thing seems to work is onclick="loadpano(virtualtour.xml);" but it opens with map hotspots hidden...

than just simple use this:

Code:

            onclick="mainloadpano(virtualtour.xml); wait(LOAD); slide_action_in();"

this loads the pano, its waiting until xml file is completely loaded and than the action for opening the thumbnails is started... (not the thumbnailstack...)
you also can use your

Code:

onclick="loadpano(virtualtour.xml); wait(LOAD); slide_action_in();"

the loadpano is from krpano directly, the mainloadpano is an action found in your virtualtour.xml and doing in general the same with additional lines of code...

Georg

PS:
panotours google maps to to open it: openpanotourmaps()

Last edited by gkaefer (2012-01-03 19:49:11)

Offline

 

#5 2012-01-03 23:25:44

piripino
New member
Registered: 2011-12-30
Posts: 3

Re: editing the basic profile

thanks again but still doesn't work

the first code reloads the whole scene but map suddenly disappear, the second code reloads the whole scene without map hotspots...

I found another solution but i don't know if it's correct: in menu

Code:

onclick="loadpano(virtualtour.xml);"

and in map plugin i set "true" all hotspots' visibility

Code:

<plugin name="map" url="virtualtourdata/map/map.png" keep="true" align="righttop" x="10" y="10" width="540" height="480" handcursor="false" onloaded="showmapspot();" onclick="closemap"/>
    <plugin keep="true" visible="true" name="mapspot0" onclick="mainloadpano(virtualtour0.xml);" url="virtualtourdata/graphics/spots/spot0.png" blingCounter="0" onhover="showtext('SOGGIORNO');" align="lefttop" edge="center" parent="map" x="32.4444%" y="46%"/>
    <plugin keep="true" visible="true" name="mapspot1" onclick="mainloadpano(virtualtour2.xml);" url="virtualtourdata/graphics/spots/spot0.png" blingCounter="0" onhover="showtext('DISIMPEGNO');" align="lefttop" edge="center" parent="map" x="65.3333%" y="50%"/>
    <plugin keep="true" visible="true" name="mapspot2" onclick="mainloadpano(virtualtour1.xml);" url="virtualtourdata/graphics/spots/spot0.png" blingCounter="0" onhover="showtext('CUCINA');" align="lefttop" edge="center" parent="map" x="54.2222%" y="68.5%"/>
    <plugin keep="true" visible="true" name="mapspot3" onclick="mainloadpano(virtualtour5.xml);" url="virtualtourdata/graphics/spots/spot0.png" blingCounter="0" onhover="showtext('CAMERETTA');" align="lefttop" edge="center" parent="map" x="68.4444%" y="62%"/>
    <plugin keep="true" visible="true" name="mapspot4" onclick="mainloadpano(virtualtour4.xml);" url="virtualtourdata/graphics/spots/spot0.png" blingCounter="0" onhover="showtext('BAGNO');" align="lefttop" edge="center" parent="map" x="77.7778%" y="46.5%"/>
    <plugin keep="true" visible="true" name="mapspot5" onclick="mainloadpano(virtualtour3.xml);" url="virtualtourdata/graphics/spots/spot0.png" blingCounter="0" onhover="showtext('CAMERA');" align="lefttop" edge="center" parent="map" x="67.5556%" y="30%"/>

this gives me the result i want: could it give any further error?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson