• Hi, I have a tour with textfield-info-window for each pano which you can see in different languages.
    But I don't get the language to change. The first choosen language is staying no matter what language I click. And changing a scene also doesn't show the new but the old info from first pano.
    I thought maybe the keep="true" is responsible but I don't know what to do to get it working...
    any hints?

    3 language switchers:

    Code
    <plugin name="lang_de" url="plugins/textfield.swf" html="de" onclick="txtadd(lang, get(xml.scene),_de);show_info();" />
    	<plugin name="lang_en"  url="plugins/textfield.swf" html="en" onclick="txtadd(lang, get(xml.scene),_en);show_info();" />
    	<plugin name="lang_es" url="plugins/textfield.swf" html="es" onclick="txtadd(lang, get(xml.scene),_es);show_info();" />

    info-window:

    Code
    <plugin name="text_pano" url="plugins/textfield.swf" keep="true" visible="false"
    		html=""
    ...
       	onclick="show_info();"

    action to show window:

    Code
    <action name="show_info">
    		set(plugin[text_pano].html, data:get(lang));
    	switch(plugin[text_pano].visible); 
    	</action>

    scenes like this:

    Code
    <scene name="pano1" ...</scene>
    <scene name="pano2" ...</scene>
    <scene name="pano3" ...</scene>

    and language data like this:

    Code
    <data name="pano1_de">...</data>
    <data name="pano2_de">...</data>
    <data name="pano3_de">...</data>
    <data name="pano1_en">...</data>
    <data name="pano2_en">...</data>
    <data name="pano3_en">...</data>
    <data name="pano1_es">...</data>
    <data name="pano2_es">...</data>
    <data name="pano3_es">...</data>

    Edited 2 times, last by Muxi (September 9, 2016 at 6:31 PM).

  • Try this code


    Code
    <plugin name="lang_de" url="plugins/textfield.swf" html="de" onclick="txtadd(lang, get(sccene[get(xml.scene)].name),'_de');show_info(get(lang));" />  <plugin name="lang_en" url="plugins/textfield.swf" html="en" onclick="txtadd(lang, get(sccene[get(xml.scene)].name),'_en');show_info(get(lang));" />  <plugin name="lang_es" url="plugins/textfield.swf" html="es" onclick="txtadd(lang, get(sccene[get(xml.scene)].name),'_es');show_info(get(lang));" />



    Code
    <action name="show_info">  	copy(plugin[text_pano].html, data[%1].content);  	switch(plugin[text_pano].visible);   </action>
      ...




    Piotr


    p.s. I dont know why "Insert Code" not accept my line brakes...

  • thanks, Piotr.

    It was only a matter of

    Code
    copy(plugin[text_pano].html, data[%1].content);


    the transfer of the variable worked already in my example, so no need to change the other things.

    also

    Code
    copy(plugin[text_pano].html, data[get(lang)].content);

    is working.

    best regards

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!