I'm having trouble understanding how variables work
I'd like to use a language cookie to set a variable which I can then use to select which images to display. So to get started I'm testing this code:
Code
<action name="startup"> set(language,'EN'); trace(get(language));/>
---
<plugin name="ENbtn" url="ENbtn.png" align="topright" x="0" y="0" visible="false" onclick="js(setCookie('EN'));" keep="true"/>
<plugin name="FRbtn" url="FRbtn.png" align="topright" x="0" y="0" visible="false" onclick="js(setCookie('FR'));" keep="true"/>
---
<scene name="scene_GareRilly_pano" title="GareRilly" onstart="showLanguageBtn();" thumburl="panos/GareRilly_2_pano.tiles/thumb.jpg" lat="" lng="" heading="" >
---
<action name="showLanguageBtn">
trace(get(language));
if(language=='FR',
set(plugin[ENbtn].visible,true);
,
set(plugin[FRbtn].visible,true);
);
</action>
Alles anzeigen
the first trace shows the correct variable but the second trace, inside the action, shows that get(language) is null
I'm baffled...