Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Samstag, 29. November 2008, 04:13

ComboBox Options

Hi, I was playing with the Combo Box plugin and I noticed that in the demos it loaded sphere images - is there a way to load different XML files through it instead. I use tiles for my tours, so loading sphere wouldn't work for my app.

2

Samstag, 29. November 2008, 20:31

Hi,

yes, you can apply any actions to a combobox item - loading a xml, a image, changing something...

at the moment I recommend this way to set actions for a combobox:
  • add the combobox items dynamically in the onloaded event
  • assign a action for each item
here is a example:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<plugin name="combobox"
        url="%SWFPATH%/plugins/combobox.swf" 
        align="lefttop" 
        x="10" 
        y="10" 
        width="33%"
        keep="true"
        onloaded="action(setupitems);"
        />
	
<action name="setupitems">
    removeall();
    additem(Item 1, action(item1) );
    additem(Item 2, action(item2) );
    additem(Item 3, action(item3) );
</action>

<action name="item1">
    loadpano(pano1.xml);
</action>

<action name="item2">
    loadpano(pano2.xml);
</action>

<action name="item3">
    loadpano(pano2.xml);
</action>


best regards,
Klaus

3

Freitag, 19. Dezember 2008, 20:56

PROBLEM: Working with HOTSPOTS and the ComboBox.

Is there a way to change just the comboxbox item name when a hotspot is clicked within a virtual tour? For example:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<action name="setupitems"> 
    removeall();
    additem(Garten, action(load1);); 
    additem(Keller1, action(load2);); 
    additem(Keller2, action(load3);); 
    additem(Stuebal, action(load4);); 
</action>
 
<action name="load1"> 
    set(plugin[spotx].x,200); 
    set(plugin[spotx].y,50); 
    set(plugin[radar].x,200); 
    set(plugin[radar].y,50); 
    loadpano(Garten.xml,null,KEEPALL,BLEND(1)); 
    set(plugin[radar].heading,0); 
</action>


When you have this and you use the combobox, then the hotspot adjusts accordingly because it is inside an action. But if you click the hotspot to change the panorama, then the combobox doesn't change the name. So is there something like SETITEM or similar to use to change just the name of the dropdown item in the comboxbox ?

4

Freitag, 19. Dezember 2008, 21:59

Hi,

yes, there is a "selectitem" function
have a look:

http://krpano.com/plugins/combobox/#selectitem

5

Samstag, 20. Dezember 2008, 01:32

I've tried the following:

Quellcode

1
2
set(plugin[combobox].selectitem(combobox:Exterior Sunset)); 
set(plugin[combobox].selectitem(Exterior Sunset));


doesn't seem to work? Also, when you do capitalize the words, ex: <action name="combobox:Exterior Sunset"> , the capital letters don't work? (see combobox.xml you've provided in the download ZIP file, there are no capital letters)

6

Montag, 22. Dezember 2008, 16:26

Hi,

the "set" is wrong
just use only:

Quellcode

1
plugin[combobox].selectitem(combobox:Exterior Sunset);



I know the problem/bug with the capital letters,
a possiblity to fix it at the moment is to use additem() instead of <action name="combobox:...">

7

Mittwoch, 24. Dezember 2008, 00:19

Ok, I've tried it without "set" and it still doesn't seem to work; I've tried setting the combo boxes up using both methods. Using the latest 1.0.8 beta 4

Can you please look into this Klaus, maybe provide a working example as well?

THANK YOU! *thumbsup*

8

Montag, 5. Januar 2009, 21:24

Hi Klaus,

You've been of great help, it is much appreciated.

Sorry to come back to this again, but I think your example has bugs to begin with in the first place. In your compiled zip file: krpano/examples/combobox/combobox.html when you load this page and press the "O" and you get a DEBUG: combobox - startplugin same with combobox2.html

So maybe that's why selectitem() doesn't work since it needs to be debugged in the first place?

9

Mittwoch, 7. Januar 2009, 13:50

Hi,

this "DEBUG: combobox - startplugin" message is because I forget to remove the debug traces
in the combobox plugin, and the debugmode is enabled in the beta version

I have made now a simple XML example to demonstrate how the selectitem will work,
change the complete combobox2.xml to this:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<krpano version="1.0.8" onstart="action(pano1);">

    <plugin name="combobox"
        	url="%SWFPATH%/plugins/combobox.swf" 
        	align="lefttop" 
        	x="10" 
        	y="10" 
        	width="15%"
        	keep="true"
        	onloaded="action(setupitems);"
        	/>
	
	
    <action name="setupitems">
        removeall();
        additem(Pano 1, action(pano1) );
        additem(Pano 2, action(pano2) );
    </action>

    <action name="pano1">
        <!-- select combobox item -->
        plugin[combobox].selectitem(Pano 1);

        <!-- load pano image -->
        loadpano(null,sphere=../tour/skeller.jpg,KEEPALL,BLEND(1));
	
        <!-- set view -->
        lookat(0,0,90);
		
        <!-- dynamically add a hotspot -->
        addhotspot(keller);
        set(hotspot[keller].url,../tour/hotspot_ani.swf);
        set(hotspot[keller].ath,9);
        set(hotspot[keller].atv,-4);
        set(hotspot[keller].blendmode,invert);
        set(hotspot[keller].onhover, showtext(Pano 2));
        set(hotspot[keller].onclick, looktohotspot(keller); action(pano2); );
    </action>
	
    <action name="pano2">
        <!-- select combobox item -->
        plugin[combobox].selectitem(Pano 2);

        <!-- load pano image -->
        loadpano(null,sphere=../tour/keller.jpg,KEEPALL,BLEND(1));

        <!-- set view -->
        lookat(0,0,90);
		
        <!-- dynamically add a hotspot -->
        addhotspot(skeller);
        set(hotspot[skeller].url,../tour/hotspot_ani.swf);
        set(hotspot[skeller].ath,8);
        set(hotspot[skeller].atv,7);
        set(hotspot[skeller].scale,1.4);
        set(hotspot[skeller].blendmode,invert);
        set(hotspot[skeller].onhover,showtext(Pano1));
        set(hotspot[skeller].onclick, looktohotspot(skeller); action(pano1); );
    </action>
</krpano>

10

Dienstag, 27. Januar 2009, 11:49

Everything is working good now. Just playing with the .FLA file for the combobox, is there a way to change the font family, font color, and the font size? I couldn't find the reference in the actionscript ? *confused*

11

Dienstag, 27. Januar 2009, 22:11

Hi,

I haven't work much with the Flash Combobox yet,
maybe this helps:

http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/controls/ComboBox.html#getStyleDefinition()

best regards,
Klaus

12

Mittwoch, 28. Januar 2009, 08:10

Ok, so to change the font color to white, where would I put

Quellcode

1
combobox.setStyle("color", 0xFFFFFF);

in the actionscript ? Is it somewhere in the krpano_as3_interface.as ? I'm pretty new to Flash CS3.

Any help would be *w00t*

13

Donnerstag, 29. Januar 2009, 19:05

Hi,

no this needed to be done in the combobox.fla,

open it in Flash CS3,
then open the "actions" window and then the source,
and try to add this line in the startplugin() function, e.g.:

Quellcode

1
2
3
4
function startplugin(event:Event):void
{
combobox.setStyle("color", 0xFFFFFF);
....


best regards,
Klaus

14

Freitag, 30. Januar 2009, 08:13

Thanks a bunch Klaus!

Found out how to embed a font as well: http://www.gotoandlearnforum.com/viewtop…&t=14638#p74303

15

Mittwoch, 24. Februar 2010, 11:55

Problems skinning font color of combobox

Hi,

I'm using Krpano 1.0.8, and i'm trying to change the font color of the combobox plugin.

So, i took the combobox.fla (1.0.7) and i changed the AS code to allow the combobox to work in 1.0.7 and all higher versions :

I replaced

Quellcode

1
if ( krpano.get("version") != "1.0.7" )


by

Quellcode

1
if ( krpano.get("version") < "1.0.7" )


Then, i added this line code in the startplugin() function :

Quellcode

1
2
3
4
5
function startplugin(event:Event):void
{	
 	combobox.setStyle("color", 0xBFB179);
 	...
}


I saved the fla in .cs3 and then i had a warning alert from Adobe Flash CS4

"The file has data which will be lost in case of saving in Flash cs3 format :
- Metadata of the infobox on the XMP file
Would you like to save in cs3 format anyway ?"

I clicked "yes" and i compiled in .swf.

RESULT : the font color stays in black (default), there's no change

Can someone tell me what i did wrong ? Is it because of the warning alert ?

Thanks for your response

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »MissZougou« (24. Februar 2010, 12:28)


16

Mittwoch, 24. Februar 2010, 13:49

Hi,
Can someone tell me what i did wrong ? Is it because of the warning alert ?
no, sorry, no idea at the moment,
but it's not because of the warning,

best regards,
Klaus

17

Donnerstag, 25. Februar 2010, 11:46

Thanks anyway Klaus !
I'll keep searching ...

N'drew

Anfänger

Beiträge: 17

Wohnort: RUSSIA

Beruf: IT engineer

  • Nachricht senden

18

Montag, 26. April 2010, 16:43

How do I change the number of lines in the combobox?
default = 5

HansNyb

Profi

Beiträge: 936

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

19

Montag, 26. April 2010, 17:38

How do I change the number of lines in the combobox?
default = 5


If you talk about the number visible without scrolling it is something I also would be interested in.

Hans

20

Montag, 26. April 2010, 18:10

Hi,

Use the rowcount attribute... You can view an example on the FOV types examples

Quellcode

1
<plugin name="combobox" url="%SWFPATH%/plugins/combobox.swf" ..... rowcount="10"  />


SAlut.

Ähnliche Themen