You are not logged in.

Ukrajinec

Beginner

  • "Ukrajinec" started this thread

Posts: 33

Location: Ukraine, Lviv

  • Send private message

1

Thursday, November 22nd 2012, 4:58pm

Some question about combobox..

Good day!
I have a combobox, which must to change language at the panorama. It's described at the file build.xml

Quoted

...
<plugin name="comboboxlang" url="builddata/graphics/combobox.swf"
preload="true"
keep="true"
align="rightbottom"
x="10"
y="10"
width="55"
height="25"
rowcount="3">
<item name="ENGbox" caption="ENG" onClick="ENG"/>
<item name="ITbox" caption="IT" onClick="IT"/>
<item name="RUSbox" caption="RUS" onClick="RUS"/>
</plugin>

<action name="ENG" keep="true">
set(plugin[in].onhover, "showtext(Zoom in, navstyle)");
set(plugin[out].onhover, "showtext(Zoom out, navstyle)");
set(plugin[left].onhover, "showtext(Turn left, navstyle)");
set(plugin[right].onhover, "showtext(Turn right, navstyle)");
....
So, how to realize that the language, of hotspots at file build0.xml, will be changed depending of the combobox value.


And I have a combo box that lets you select the panorama which you want:

Quoted

...
<plugin name="combobox" url="builddata/graphics/combobox.swf" preload="true" alturl="builddata/graphics/combobox.js" keep="true" align="righttop" x="10" y="10" rowcount="10">
<item name="combobox0" caption="Near Mc-Donalds" onClick="mainloadpano(build0.xml);"/>
<item name="combobox1" caption="Sagrestia entrance from the street" onClick="mainloadpano(build1.xml);"/>
<item name="combobox2" caption="Left side view" onClick="mainloadpano(build2.xml);"/>
</plugin> ...
How to change the value "caption" by language combobox?
Codes as:

Quoted

set(plugin[combobox].combobox0, "caption='another text' ");
or

Quoted

set(plugin[combobox].combobox0.caption, "another text");
not works *sad*
With regards, Igor.

This post has been edited 2 times, last edit by "Ukrajinec" (Nov 23rd 2012, 8:47am)


2

Monday, December 3rd 2012, 4:16pm

Hi,

the combobox plugin isn't designed for dynamically changing the item capitations (especially the Flash version).

For a multi-language combobox or a combobox with changing items, try fully rebuilding/filling the combobox every time,
e.g.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
<action name="set_english">
  plugin[combobox1].removeAll();
  plugin[combobox1].addiditem(item1, "English Text...");
  plugin[combobox1].addiditem(item2, "Click here...");
  ...
</action>

<action name="set_german">
  plugin[combobox1].removeAll();
  plugin[combobox1].addiditem(item1, "Deutscher Text...");
  plugin[combobox1].addiditem(item2, "Hier klicken...");
   ...
</action>


Best regards,
Klaus

Ukrajinec

Beginner

  • "Ukrajinec" started this thread

Posts: 33

Location: Ukraine, Lviv

  • Send private message

3

Wednesday, December 19th 2012, 9:58am

Thank you, Klaus, but now we decided to pull a specific .xml-file to the specific language *smile*
But still thank you =)
With regards, Igor.