set hotspot‘s list outside scene

  • hi guys i set 2 language ui for the tour,and also set 2 language hospot for it.
    i use combobox for selecting.it works when language change, but when the scene change the hospot still unchange.
    here is the code
    these 2 hospot is for the 2 language i set one visible "true" and one "false"

    Code
    <hotspot name="spot7" style="floorchinese"  html="上楼" ath="-61.861" atv="8.823" onclick="switch(layer[skin1].visible);switch(layer[skin2].visible);" visible="true"/>
    <hotspot name="spot10" style="floorenglish"  html="upstairs" ath="-61.861" atv="8.823" onclick="switch(layer[skin1].visible);switch(layer[skin2].visible);" visible="false"/>


    i use this action change UI

    Code
    <action name="change_skin_design">
    		set(design, %1);
    		copy(skin_thumbs_last_state, layer[skin_thumbs].state);
    		loadpanoscene('%SWFPATH%/tour.xml', get(xml.scene), null, IGNOREKEEP|KEEPVIEW|KEEPMOVING, BLEND(0.5));
    		
    	</action>


    this action change hotspot visible or not


    this is for the combobox

    Code
    <plugin name="language" keep="true"
    	        url="%SWFPATH%/plugins/combobox.swf"
    	        alturl="%SWFPATH%/plugins/combobox.js" native="false"
    	        align="lefttop" x="10" y="0" >
           <item name="item1" caption="国语"  onclick="change_skin_design('chinese');hotspotchinese();" />
        <item name="item2" caption="English"  onclick="change_skin_design('english');hotspotenglish();" />


    could some one help me

  • Hi
    About first...

    You can use onloaded method to check what language is active in you project.

    Code
    <hotspot name="spot7" style="floorchinese"  html="上楼" ... onloaded="if(design == 'english', set(visible, false))" />
    <hotspot name="spot10" style="floorenglish"  html="upstairs" ...  onloaded="if(design == 'chinese', set(visible, false))" />


    Piotr

Participate now!

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