So I have a flash plugin that i've been working on and i'm having trouble getting updated parameters from krpano.
in the xml I have:
Code
<plugin name="button_connect"
url="%SWFPATH%/resources/ui_button_connect.png"
visible="true"
onclick="switch(plugin[second_plugin].connect_on);"
/>
<plugin name="second_plugin"
url="%SWFPATH%/resources/plugin.swf"
connect_on = "true"
/>
Display More
And inside the flash plugin I register the change event and try to get the parameter connect_on
Code
var krpano_plugin;
krpano = krpano_as3_interface.getInstance();
krpano.addPluginEventListener(this, krpano_as3_interface.PLUGINEVENT_UPDATE, updateListener);
function updateListener(evt:DataEvent):void {
var updated_attribute:String = evt.data;
if (updated_attribute == "connect_on")
{
var connect_on:Boolean = krpano.get("plugin[second_plugin].connect_on");
krpano.trace(0, "connect on:" + connect_on);
}
}
Display More
However, connect_on remains true and doesn't toggle. I wasn't sure if the krpano interface just gets the initial state krpano and doesn't change? or if I was accessing it incorrectly.
Any help would be appreciated.