• I'm trying to embed a pano without using the XML. The problem appears when I want to create an action (for combobox).
    I don't know where to write the action text. My example creates a combobox, but when I'm selecting an item an error appears:
    "ERROR: action not found: combobox:item2"
    In documentation there's only explanation of simple variables such as
    <krpano>
    <image type="SPHERE" />
    ...

    is the same as
    krpano.image.type="SHPERE"
    But how to implement a code like this?
    <action name="combobox:item1">
    loadpano(null,sphere=item.jpg,KEEPALL,BLEND(1));
    </action>


    My example:
    var flashvars =

    {
    "sphere" : "sphere_example.jpg",
    "plugin[0].name":"combobox",
    "plugin[0].url":"plugins/combobox.swf",
    "plugin[0].align":"righttop",
    "action[0].name" :"combobox:item1",
    "action[1].name" :"combobox:item2"

    };

    swfobject.embedSWF("krpano.swf", "krpano", "640", "480", "9.0.28", "swfobject21/expressInstall.swf", flashvars, {allowfullscreen:true, bgcolor:"#000000"}, {id:'krpano', name:'krpano'});

  • Hi,

    the <action>, <data> and <scene> tags are special ones,
    their 'content' is set via the 'content' attribute,

    and something other - setting the 'name' is not necessary,
    that will be done automatically when using the 'name' as 'index',

    e.g. so instead of:

    Code
    "sphere" : "sphere_example.jpg",
    "plugin[0].name":"combobox",
    "plugin[0].url":"plugins/combobox.swf",
    "plugin[0].align":"righttop",
    "action[0].name" :"combobox:item1",
    "action[1].name" :"combobox:item2"

    do this:

    Code
    "sphere" : "sphere_example.jpg",
    "plugin[combobox].url":"plugins/combobox.swf",
    "plugin[combobox].align":"righttop",
    "action[combobox:item1].content" :"trace(item 1 selected);",
    "action[combobox:item2].content" :"trace(item 2 selected);"

    best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!