Image-stitching and virtual tour solutions My account Updates
It is currently Mon Jul 28, 2014 11:39 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Mar 28, 2014 5:21 am 
Offline
Member

Joined: Mon Mar 24, 2014 6:10 am
Posts: 49
hello all,

In my tour there is a layer which contains a togglebutton:

Code:
 <layer name="togglebutton"
         keep="true"
         url="%FIRSTXML%/graphics/togglebutton/button_aerial_view_grey.png"
         align="topleft"
         x="30"
         y="30"
         zorder="7"
         state="true"
         onclick="togglebuttonOnClick"
         alpha="0.7"
         onover="tween(alpha,1.0,0.5,easeOutQuad);"
         onout="tween(alpha,0.7,0.5,easeOutQuad);"
         visible="false"
         />


When I click this button it changes to this button: graphics/togglebutton/button_mini_ramp.png
Perfect! :)

But I want this button to change as well when I click on a specific hotspot of my tour:

Code:
<action name="onclickspotpoint30">[color=#FF0040]Which action goes here to change my toggle button?[/color]
         </action>



Now maybe you say use the same action like above: onclick"toggelbuttonOnClick"
This action looks like this:

Code:
<action name="togglebuttonOnClick">
    if (state,
      set(state, false);
          if (xml.scene != pano26,
            mainloadscene(pano26);
          );
      lookat(118.000000, 28.056680, 123.886640);
   
      set(url,%FIRSTXML%/graphics/togglebutton/button_mini_ramp.png);
     ,
      set(state, true);
          if (xml.scene != pano22,
            mainloadscene(pano22);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
   
      set(url,%FIRSTXML%/graphics/togglebutton/button_aerial_view_grey.png);
    );
  </action>



I tried this, but it did not work.


thank you for your help!


Top
 Profile  
 
PostPosted: Fri Mar 28, 2014 4:34 pm 
Offline
Member

Joined: Mon Mar 24, 2014 6:10 am
Posts: 49
ok, now I found out how to "communicate" with the layer (togglebutton) that contains the image I want to change when clicking on a hotspot:

Code:
<action name="onclickspotpoint30">tween(plugin[togglebutton].x, 300, 1.0);
         </action>


This action moves my layer to the right, after a click on the hotspot. Does anybody know how to change the image of the layer when clicking on the hotspot (spotpoint30)? I imagine it has to look something like this:

Code:
<action name="onclickspotpoint30">imageurl(plugin[togglebutton]= button_mini_ramp.png);
         </action>


Does anyone know the correct syntax of the code?

thank you!


Top
 Profile  
 
PostPosted: Fri Mar 28, 2014 7:08 pm 
Offline
Member

Joined: Mon Mar 24, 2014 6:10 am
Posts: 49
I found the solution to change the image in the layer. For anyone interested in it:

<action name="onclickspotpoint31">
set(layer[togglebutton].url, %FIRSTXML%/graphics/togglebutton/button_mini_ramp.png);
</action>

But now I have to find also how to apply a new link to this button.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group