update combobox after scene change

  • We are trying to change the selected item on the combobox after the scene changes.

    We have followed a code example found in the forum using the events tag and onloadcomplete, however, the combobox is not updating after the new scene is loaded.

    Does "xml.scene" still return the correct title value to update the combobox selectitem by the title?

    Is the "plugin[combobox]" available from the <events> tag? there is only 1 combobox defined on the layer.

    Here is the code from the vtourskin.xml

    <events name="skin_events" keep="true"

    onxmlcomplete="skin_startup(); set(events[skin_events].onxmlcomplete,null);"

    onnewpano="skin_showloading(true); scene_setcurrentsceneindex(); skin_update_scene_infos();"

    onremovepano="skin_showloading(true);"

    onloadcomplete="skin_showloading(false); plugin[combobox].selectitem( get(xml.scene) );"

    onresize="skin_onresize();"

    />

    Any assistance would be appreciated

  • the correct syntax to retrieve the name of the scene - which refers back to the scene name that is used in the combobox

    get(scene[get(xml.scene)].title)

    the working parameter is

    onloadcomplete="skin_showloading(false); plugin[vtourcombobox].selectitem( get(scene[get(xml.scene)].title) );"

Participate now!

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