Sie sind nicht angemeldet.

1

Donnerstag, 18. September 2014, 22:13

Different images in arrows using one syle

Hi!
I want to use different arrows in addition to standart vtourskin_hotspot.png
But I want to do it witout making separate style for each different arrow image, because all code displayed dynamically and I want to use vtourskin.xml without php changing it.

In vtourskin.xml I wrote this code:

Quellcode

1
2
3
4
5
6
7
8
<style name="skin_hotspotstyle" 
url="get(hotspotimageurl)"	 
scale="0.5"
edge="top" oy="0" 
distorted="false"
tooltip=""		
onclick="if(linkedscene, skin_hidetooltips(); tween(scale,0.25,0.5); tween(oy,-20,0.5); tween(alpha,0,0.5); looktohotspot(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); skin_updatescroll(); );" 
/>


where I need to get image file name into url - url="get(hotspotimageurl)"
In scene I adding new parametr to hotspot - hotspotimageirl

Quellcode

1
2
<hotspot hotspotimageurl="skin/left.png" tooltip="test text 1" name="spot1" style="skin_hotspotstyle" ath="92" atv="5" linkedscene="scene_2" />
<hotspot hotspotimageurl="skin/right.png" tooltip="test text 2" name="spot2" style="skin_hotspotstyle" ath="-30" atv="11" linkedscene="scene_1" />



But function "get" doesn't work inside style url. I also tried such as - url="[get(hotspotimageurl)]"
In krpano I have such error - ERROR: download of "skin/[get(hotspotimageurl)]" failed

How properly and correctly implement it?

2

Donnerstag, 18. September 2014, 23:51

HI,

It's not possible to put an action in the url attribute, but you can use set() to change it from another action.

If you want to change the image of the hotspot dynamically you could try using a single image containing both versions, and using crop to control which one to display.

Hernán
My Krpano plugins: Auto Thumbs - Tooltip - Abs