You are not logged in.

  • "designsubway" started this thread

Posts: 40

Location: York, UK

Occupation: Graphic Designer

  • Send private message

1

Tuesday, November 3rd 2009, 3:36pm

Combobox and Scenes Help

Hi all
I currently have a pano with several scenes and a combobox which navigates between scenes.
The combobox 'knows' which scene it is on by using the code;

Source code

1
2
3
4
<scene name="scene1" onstart="action(startscene01);">
<action name="startscene01">
		plugin[combobox].selectitem('Filey Brigg');
</action>

The pano knows which scene to start on by using the code;

Source code

1
<krpano version="1.0.8" onstart="loadscene(scene1,null,MERGE,BLEND(1));" >


This all works perfectly fine. However, when I change the code so that the pano starts with a scene other than scene1 the combobox doesn't change to the correct description.
For example, if I change the code at the top of the xml to

Source code

1
<krpano version="1.0.8" onstart="loadscene(scene5,null,MERGE,BLEND(1));" >

Then the pano loads with scene5 first but the text in the combobox is still scene1.

Any help would be appreciated, thanks.

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Tuesday, November 3rd 2009, 7:47pm

Hi designsubway,

Quoted

Then the pano loads with scene5 first but the text in the combobox is still scene1.
I think this is because the combobox is not ready yet....
Press the O key to see what the debuger says:

Source code

1
2
3
INFO: krpano 1.0.8 beta 9 DEV (build 2009-10-29)
INFO: Flashplayer WIN 10,0,32,18 PlugIn
WARNING: unknown action command: plugin[combobox].selectitem

Instead of using <scene onstart="action(startscene01);" , try to use <events onloadcomplete="action(startscene01);"

Source code

1
2
3
4
5
6
7
8
<scene name="scene3" onstart="">
	
	<events onloadcomplete="action(startscene03);" />
		
	<action name="startscene03">
		plugin[combobox].selectitem('Item 3');
	</action>
....

I have tried this way, and for me it works.

SAlut.

  • "designsubway" started this thread

Posts: 40

Location: York, UK

Occupation: Graphic Designer

  • Send private message

3

Wednesday, November 4th 2009, 10:01am

Thank you, that works great.

4

Saturday, November 7th 2009, 3:48pm

Hi,

yes, the reason for this error was, that the selectitem() function was called before the combobox plugin was loaded,

but there is a way to force loading the combobox plugin before the pano and before any action code can be executed,
just add - preload="true" - to the plugin,

e.g.

Source code

1
<plugin ... url="combobox.swf ... preload="true" />


best regards,
Klaus