Sie sind nicht angemeldet.

1

Dienstag, 11. Juni 2013, 01:08

set(plugin[].html:data is driving me mad...

Hello folks,

some time ago, this code here worked just fine to display in a text box different text for different hotspots:

Quellcode

1
2
3
4
5
6
7
8
9
	<action name="a_popuptext">
				trace(%1);
				set(plugin[bg_text].visible,true);
				tween(plugin[bg_text].alpha,1,0.5,default);
		    		set(plugin[bg_text].enabled,true);
		    	    set(plugin[text_html].html,data:details_%1);  		
		    		trace(plugin[text_html].html);
		    		set(plugin[text_html].visible,true);
	</action>


Now that I want a button to display infos about a certain scene, I used xml.scene for
that purpose and something strange is happening: the first trace gives
me a correct name of the scene for %1, but the second one leaves me with
"data:details_xml.scene" only. Why is this happening - in my old
example I could connect the name of a data field with this kind of
values directly.

Any idea?

Thanks in advance,
Michael

2

Mittwoch, 3. Juli 2013, 19:25

Maybe try this...

Quellcode

1
2
3
4
5
6
7
8
9
10
	<action name="a_popuptext">
				trace(%1);
				set(plugin[bg_text].visible,true);
				tween(plugin[bg_text].alpha,1,0.5,default);
		    		set(plugin[bg_text].enabled,true);
txtadd(temp, 'data:details_',get(%1));
 set(plugin[text_html].html,get(temp));  		
		    		trace(plugin[text_html].html);
		    		set(plugin[text_html].visible,true);
	</action>

txtad(temp, 'data:details_', %1)); might be more appropriate.
didn't test it offhand for any errors but i think that should help.
Tony

Ähnliche Themen