Sie sind nicht angemeldet.

jordi

Profi

  • »jordi« ist der Autor dieses Themas

Beiträge: 583

Wohnort: Barcelona

Beruf: creating ideas & coding them

  • Nachricht senden

1

Donnerstag, 6. Juni 2013, 13:49

dinamically generate url atribute in style

Hi,

Does anybody knows if it could be possible to define a dinamic url in the style ?

I know it can be done when I don't even generate the layers, by using an action with a for that creates the layers and define the attributes, but I just want to set up the url atrribute in the style :

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<layer name="thumb_room1"         x="015" y="063" style="thumb" />

<style name="thumb"	keep="true" align="topleft" width="64" height="64" 
		
                url="if(name, 
			subtxt(thumb_name,name,6,50);		
			txtadd(thumb_url ,'%HTMLPATH%/panos/', get(thumb_name),'.tiles/thumb.jpg');
			copy(layer[get(name)].url, thumb_url);
		);"	
		onclick="if(name, 
		subtxt(scene_name,name,6,50);		
		txtadd(linkedscene ,'scene_', get(scene_name));
		loadscene(get(linkedscene),null,MERGE,BLEND(1)););
		if(hview,lookat(get(hview),get(vview),get(fovview)),			   
		lookat(get(view.hlookat),get(view.vlookat),get(view.fov)););
		"
		
		onover="		
		if(name, 
			subtxt(scene_name,name,6,30);
			txtadd(linkedscene ,'scene_', get(scene_name));
			copy(layer[tooltip_buts].html, scene[get(linkedscene)].title);
			set(layer[tooltip_buts].visible, true);
	        tween(layer[tooltip_buts].alpha, 1.0, 0.5);
	        asyncloop(hovering, copy(layer[tooltip_buts].x,mouse.stagex); copy(layer[tooltip_buts].y,mouse.stagey););
		);		
		"
		
		onout="tween(layer[tooltip_buts].alpha, 0.0, 0.25, default, set(layer[tooltip_buts].visible,false), copy(layer[tooltip_buts].x,mouse.stagex); copy(layer[tooltip_buts].y,mouse.stagey); );"	
		
		
		/>
everpano.com step beyond 360

2

Montag, 10. Juni 2013, 20:53

Hi,

that's not possible this way - action code will be only executed when called from events or actions. That means it's not possible to put any action code inside an normal attribute.

Best regards,
Klaus