News Examples Documentation Download Buy Forum Contact
NOTE: This page is from an older version, switch to the latest version here.

Combobox Plugin combobox.swf Version 1.0.7

  • a simple combobox
  • items of it can be assigned with actions - e.g. to load other panoramas
  • it's possible to add / remove dynamically items
  • flash source code included (FLA for Flash CS3)

Usage:
  • the position and size of it can by adjusted with the normal plugin attributes
    (align, x, y, width, height, ...)
  • per default the plugin searches for actions named "combobox:LABEL",
    where LABEL is the label of the item, and add them to the combobox and assign it automatically with the action.
  • or use the interface functions of it to add / remove or select items:
    the combobox plugin has following interface functions:
    • additem(label,actions) - adds a single item to the combobox

      parameters:
      • label - label of the item
      • action - actions to execute on selection
    • removeall() - remove all items

    • selectitem(label) - select a item

      parameters:
      • label - label of the item
    NOTE - when calling these function the prefix "plugin[name]." must be added, only if the event from which it will be called is direct from the plugin itself this prefix is not needed!


example xml code - how to use automatic items:
<krpano version="1.0.7">
    <plugin name="combobox"
            url="plugins/combobox.swf" 
            align="lefttop" 
            x="10" 
            y="10" 
            width="150"
            keep="true"
            />
    
    <action name="combobox:Pano1">
        loadpano(pano1.xml,null,MERGE,BLEND(1));
    </action>

    <action name="combobox:Pano2">
        loadpano(pano2.xml,null,MERGE,BLEND(1));
    </action>
</krpano>


example xml code - manually add items - do this in the onloaded event:
<krpano version="1.0.7">
    <plugin name="combobox"
            url="plugins/combobox.swf" 
            align="lefttop" 
            x="10" 
            y="10" 
            width="150"
            keep="true"
            onloaded="action(setupitems);"
            />
    
    <!-- NOTE - this action is called from the combobox plugin
         so the prefix "plugin[combobox]." is not needed here -->
         
    <action name="setupitems">
        removeall();
        additem(Item 1, loadpano(pano1.xml,null,MERGE,BLEND(1)); );
        additem(Item 2, loadpano(pano2.xml,null,MERGE,BLEND(1)); );
        additem(Item 3, loadpano(pano3.xml,null,MERGE,BLEND(1)); );
    </action>
</krpano>