Sie sind nicht angemeldet.

zzzone

Schüler

  • »zzzone« ist der Autor dieses Themas

Beiträge: 64

Wohnort: Bristol

Beruf: Photographer

  • Nachricht senden

1

Sonntag, 28. April 2013, 10:06

Click Thumb and change Combobox

I am 99% successful in combining the scrolling thumbnails skin and the combobox skin

I am trying to find the instruction in the xml that calls the next scene when clicking on a thumb?

I see the code plugin[skin_cb_scenes].selectiditem(get(linkedscene)); added to the onclick instruction to achieve the combobox label change in the viewer but I cannot work out where the same call is when clicking on a scrolling thumb. Consequently thumbs do not change the combobox label *confused*

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »zzzone« (1. Mai 2013, 08:37)


2

Dienstag, 30. April 2013, 18:31

Hi,

try using the onnewpano event to get notified when there is a new pano, and the call some code that will update the combobox accordingly to the current scene. The current scene name can be get by the 'xml.scene' variable.

See the vtourskin.xml for details - there the same is done.

Best regards,
Klaus

zzzone

Schüler

  • »zzzone« ist der Autor dieses Themas

Beiträge: 64

Wohnort: Bristol

Beruf: Photographer

  • Nachricht senden

3

Mittwoch, 1. Mai 2013, 09:02

Hi Klaus

Mmmm!

Always impressive when we have the main man in the case *smile*

Unfortunately I am not knowledgable about this!! *confused*

I have found onnewpano in the skin events bit in vtourskin and I amended to

onnewpano="skin_showloading(true); skin_update_scene_infos(); plugin[skin_cb_scenes].selectiditem(get(linkedscene));"

Don't laugh if I got it completely wrong!! I did try but it didn't work.

Steve

4

Freitag, 3. Mai 2013, 09:00

Hi,

onnewpano="skin_showloading(true); skin_update_scene_infos(); plugin[skin_cb_scenes].selectiditem(get(linkedscene));"
This is already the right direction - but there is no 'linkedscene' variable in this case (the linkedscene is only an attribute that was used by hotspot in the default vtour skin).

The current scene name would be available via 'xml.scene' - that means when your item-id and scene-name are the same - using get(xml.scene) - could work in this case:

Quellcode

1
plugin[skin_cb_scenes].selectiditem(get(xml.scene));


Otherwise you could also store a custom attribute for the item-id at each scene element - e.g.

Quellcode

1
2
<scene .... cbid="...">
...

and then load/use this id to select the right item:

Quellcode

1
plugin[skin_cb_scenes].selectiditem(get(scene[get(xml.scene)].cbid));


Best regards,
Klaus

zzzone

Schüler

  • »zzzone« ist der Autor dieses Themas

Beiträge: 64

Wohnort: Bristol

Beruf: Photographer

  • Nachricht senden

5

Sonntag, 5. Mai 2013, 15:39

Klaus , brilliant many thanks, Steve