Sie sind nicht angemeldet.

1

Sonntag, 12. Februar 2012, 19:37

Plugin to remove hotspots tourwide

I love this forum, there's so many creative people helping each other.

I recently created a mute/resume button plugin when clicked mutes the sound, and then clicked again resumes. (Pretty straight forward huh?)

My next task is another button similar to the previous, only instead of removing/playing the sound, I want it to hide/show all the hotspots I've created. (I've created multiple new hotspots because the textfield plugin isn't 100% trustworthy on iOS devices.) This button will be always showing, just like the music mute button, but it will hide all of the hotspots in my tour, regardless of where I am in the tour.

Currently, I have about 8 hotspots names ranging from hotspot_ani_Kit, to hotspot_ani_MBR, and there's a set number based on the rooms, so I guess I could try to hide those by listing them individually and setting each ones alpha to 0?

And ideas on code?

2

Sonntag, 12. Februar 2012, 20:14

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
<action name="show_hotspots">
	for(set(i,0), i LT hotspot.count, inc(i),
		set(hotspot[get(i)].visible, %1);
	);
</action>
<plugin name="show_button"
		onclick="show_hotspots(true);"
		...
		/>
<plugin name="hide_button"
		onclick="show_hotspots(false);"
		...
		/>

3

Sonntag, 12. Februar 2012, 20:25

Here's what I got so far, so when it's click it's replaced by the show hotspots button, but I don't know the code to hide these animating hotspots. I think it's working, but because it's animating, maybe it's not staying hidden?

I thought about set(plugin[hotspot_ani_Kit].visible,false); but it's not working. What's your code doing there?

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
33
34
	<plugin name="hotspot-on" 
		url="realtorimage.png"
		onloaded="set(alpha,0); tween(alpha,.8);"
		zorder="2"   
		origin="right" 
		edge="right" 
		y="3%" x="2%"
		visible="false"
		keep="true"
		onhover="showtext(Show Hotspots);"                     
		onclick="action(showHS)" />		   	
						   
   	<plugin name="hotspot-off" 
		url="eyefultourlogo.png"
		onloaded="set(alpha,0); tween(alpha,.8);"
		zorder="2"   
		origin="right" 
		edge="right" 
		y="3%" x="2%"
		visible="true"
		keep="true"
		onhover="showtext(Hide Hotspots);"                    
		onclick="action(hideHS)" />

	<action name="showHS">
		set(plugin[hotspot-off].visible,true);
		set(plugin[hotspot-on].visible,false);
		
		</action>
	<action name="hideHS">		
		set(plugin[hotspot-off].visible,false);
		set(plugin[hotspot-on].visible,true);

		</action>


Awp! Got it! thanks a ton!

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Tebasaki« (12. Februar 2012, 21:13)


Ähnliche Themen