You are not logged in.

mds

Intermediate

  • "mds" started this thread

Posts: 152

Location: Athens, GA

Occupation: Designer

  • Send private message

1

Friday, July 13th 2012, 4:13am

How do I access and change a nested plugin variable?

How would I change <image url> in the code below.

Something like this, but this doesn't work

Source code

1
set(plugin[gallery:thumbstrip].image[0].url, newurl.jpg);


See actual working plugin code here.

Source code

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
<plugin name="gallery" 
		devices="flash" 
		url="../assets/gallery.swf" 
		xmlurl="chesed.xml" 
		keep="true" 
		align="topleft" 
		visible="true" 
		handcursor="false" 
		zorder="50" 
		x="0"
		y="160"
		showing="true"
		>
		<thumbstrip space="100" speed="0.2" color="0xeedd99" barcolor="0x444444">
			<item>
				<image url="../armenian/panos/set1.tiles/mobile_f.jpg" />
				<text>Facade</text>
				<pano>load1</pano>
			</item>
			<item>
				<image url="../armenian/panos/set2.tiles/mobile_f.jpg" />
				<text>Outside</text>
				<pano>load2</pano>
			</item>
			<item>
				<image url="../armenian/panos/set3.tiles/mobile_f.jpg" />
				<text>Hall</text>
				<pano>load3</pano>
			</item>
		</thumbstrip>
</plugin>
Say "Hi!" on twitter

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Friday, July 13th 2012, 4:57pm

give each xml tag a name attribute to access its values
plugin[gallery].thumbstrip[missingname].color
plugin[gallery].thumbstrip[missingname].item[missingname].image[missingname].url

or use index numbers


plugin[gallery].thumbstrip[0].color
plugin[gallery].thumbstrip[0].item[1].image[0].url
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour