Thanks
That works. This should be updated on the plugin page for the combobox.
Hans
Thanks
That works. This should be updated on the plugin page for the combobox.
Hans
michel
But, why on https://krpano.com/plugins/combobox/ empty ?
See here about documentation: Posts 7 and 8
http://www.krpano.com/forum/wbb/inde…13563#post13563
For touchscreens monitors, I need a more big combobox for big fingers to click on small areas...
hello everybody :)
I have a Pano Tour with 3 Comboboxes (combobox1, combobox2, combobox3). Each of the Boxes contain different Links. I used the first link of each combobox not as a link but in capital letters as the header of the Box like this:
HOUSE 1
house1-link1
house1-link2
house1-link3
HOUSE 2
house2-link1
house2-link2
house2-link3
HOUSE 3
house3-link1
house3-link2
house3-link3
When I click now on a link (i.e. "house1-link1") the Combo Box sets the item to "house1-link1" - so far so good.
But when I click on another link (i.e. "house2-link2") I want the first combobox to be set back to "HOUSE1" while the second combobox shows me
now the selected "house2-link2"
I read before this would be possible with selectitems.
So I wrote in the house2-link2.xml file this code:
<action name="combobox1">
<!-- select combobox item -->
plugin[combobox1].selectitem(HOUSE 1);
</action>
<action name="combobox3">
<!-- select combobox item -->
plugin[combobox3].selectitem(HOUSE 3);
</action>
Display More
but nothing happens?
can anybody help please?
thank you!
matt
Hi mattk,
QuoteI read before this would be possible with selectitems.
So, it is ...
Here an example code based on your needs:
<krpano version="1.0.8" onstart="">
<!-- include the both plugins -->
<plugin name="editor" url="%SWFPATH%/plugins/editor.swf" keep="true" />
<!-- use only a grid preview pano to save download space ;-) -->
<preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />
<plugin name="combobox1" url="%SWFPATH%/plugins/combobox.swf" align="lefttop" x="10" y="10" width="100" dropdownwidth="78" onloaded="combobox1();" />
<action name="combobox1">
addIdItem(1, 'HOUSE 1', );
addIdItem(2, 'house1-link1', plugin[combobox2].selectitem(HOUSE 2); plugin[combobox3].selectitem(HOUSE 3); );
addIdItem(3, 'house1-link2', plugin[combobox2].selectitem(HOUSE 2); plugin[combobox3].selectitem(HOUSE 3); );
addIdItem(4, 'house1-link3', plugin[combobox2].selectitem(HOUSE 2); plugin[combobox3].selectitem(HOUSE 3); );
selectIdItem(1);
</action>
<plugin name="combobox2" url="%SWFPATH%/plugins/combobox.swf" align="lefttop" x="120" y="10" width="100" dropdownwidth="78" rowcount="10" onloaded="combobox2();" />
<action name="combobox2">
addIdItem(1, 'HOUSE 2', );
addIdItem(2, 'house2-link1', plugin[combobox1].selectitem(HOUSE 1); plugin[combobox3].selectitem(HOUSE 3); );
addIdItem(3, 'house2-link2', plugin[combobox1].selectitem(HOUSE 1); plugin[combobox3].selectitem(HOUSE 3); );
addIdItem(4, 'house2-link3', plugin[combobox1].selectitem(HOUSE 1); plugin[combobox3].selectitem(HOUSE 3); );
selectIdItem(1);
</action>
<plugin name="combobox3" url="%SWFPATH%/plugins/combobox.swf" align="lefttop" x="230" y="10" width="100" dropdownwidth="78" rowcount="10" onloaded="combobox3();" />
<action name="combobox3">
addIdItem(1, 'HOUSE 3', );
addIdItem(2, 'house3-link1', plugin[combobox1].selectitem(HOUSE 1); plugin[combobox2].selectitem(HOUSE 2); );
addIdItem(3, 'house3-link2', plugin[combobox1].selectitem(HOUSE 1); plugin[combobox2].selectitem(HOUSE 2); );
addIdItem(4, 'house3-link3', plugin[combobox1].selectitem(HOUSE 1); plugin[combobox2].selectitem(HOUSE 2); );
selectIdItem(1);
</action>
</krpano>
Display More
Note: there is 2 ways to select a combobox item:
- by is name => plugin[comboboxName].selectitem(ItemName);
- or by is ID => plugin[comboboxName].selectIdItem(ID);
Hope this help...
SAlut.
thank you Michel you rock!
this helped a lot - it works perfect!
matt
Hi Klaus and all,
I am trying to change the combobox text color to white and it has been mentioned earlier in this thread, the solution Klaus kindly posted here https://krpano.com/forum/wbb/inde…FFFF%3B#post986 however I cannot get this code working with the latest combobox plugin Version 1.0.8.14 https://krpano.com/plugins/combobox/?version=10814#top I know how to do it with the js version, its different - I am trying to it in the fla for the flash version.
I have tried Klaus's code but could'nt get it too work, this is the latest i have in the startplugin function
function startplugin(event:Event):void
{
var combobox:TextFormat = new TextFormat(); // this is my added bit for changing font color
combobox.color = 0xFFFFFF;
removeEventListener(Event.ADDED_TO_STAGE, startplugin);
// hide version info text
infotext.visible = false;
Display More
hmm just cant get it to work, i am using flash cs5, I would be really grateful if any flash people here could confirm if the solution Klaus posted earlier works with the new version of combobox Version 1.0.8.14, or if indeed it has changed and does not work anymore give an idea on how I can go about changing the text font color of the combox plugin ? Hope this makes sense
best wishes,
tom
Hi,
var combobox:TextFormat = new TextFormat(); // this is my added bit for changing font color
combobox.color = 0xFFFFFF;
this is wrong - no TextFormat!
see here:
ComboBox Options
just:
best regards,
Klaus
Hi Klaus - many thanks !
I put in text format because
was not working to change font color in combobox plugin Version 1.0.8.14 - I am using cs5 and plugin in cs4 - would that make a difference ?
Here is how i have added it
function startplugin(event:Event):void
{
combobox.setStyle("color", 0xFFFFFF);
removeEventListener(Event.ADDED_TO_STAGE, startplugin);
// hide version info text
infotext.visible = false;
.....etc
Display More
Really grateful for your advice, many thanks,
tom
Hi,
okay, the setstyle seems not to change anything,
but by doing a quick read throught the Flash Combobox docs here:
http://help.adobe.com/en_US/FlashPla…s/ComboBox.html
I found at least a way to change the font and color,
e.g.
var customTF:TextFormat = new TextFormat();
customTF.font = "Comic Sans MS";
customTF.color = 0xFF0000;
combobox.textField.setStyle("textFormat", customTF);
combobox.dropdown.setRendererStyle("textFormat", customTF);
maybe there are also settings to change the other styles, but I currently don't know them...
best regards,
Klaus
BRILLIANT !!!!! Thanks so much Klaus - its works :) One thing though it has introduced a kind of background box to the first elemenet in the combobox
e.g. http://bit.ly/j3izYc
Not sure how to get rid of this and to color the first element when combobox is in defult state ?
Thanks so much for you time - it is mega appreciated
best wishes,
tom
Hi,
I have tried to find out...
...but sorry, I don't know why that happens... maybe a missing setting or a bug of the Flash UI classes...
best regards,
Klaus
Don’t have an account yet? Register yourself now and be a part of our community!