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*

  • 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

  • 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

  • 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:

    Code
    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.

    Code
    <scene .... cbid="...">
    ...


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

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

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!