I've made a simple plugin, that needs a close button. But I can't seem to make a call to the plugin itself. I can hide all other plugins/hotspots within the plugin, but can't hide itself.
The close button:
Code
var closebutton:SimpleButton = new SimpleButton(); //create a button bar
var up:Shape = new Shape();
up.graphics.beginFill(myStyle.Btint, myStyle.Balpha);
up.graphics.drawRect(Sw - Smenu, Sh - Sb2 , Smenu - Sb - Sp, myStyle.Bwidth);
var overclose:Shape = new Shape();
overclose.graphics.beginFill(myStyle.Bover, myStyle.Balpha);
overclose.graphics.drawRect(Sw - Smenu, Sh - Sb2 , Smenu - Sb - Sp, myStyle.Bwidth);
closebutton.upState = closebutton.hitTestState = closebutton.downState = up; //no rollover effect is applied so all the states are the same.
closebutton.overState = overclose;
addChild(closebutton);
Display More
The closing function
Code
function CloseStill(evt:MouseEvent)
{
//krpano.set("still_helmi.visible,false"); //I tried setting it
//krpano.set("plugin[still_helmi].visible, false"); //I've tried to hide the whole plugin
krpano.call("action(hideallimages)"); //Ive tried to let Krpano hide it from itself by calling an action that closes it
}
No luck at all. I remember something about a Flash limitation of removing itself, but I could be mistaken. Alsoo Instead of removing it, im hiding it, could this lead to performance issues? And if so, what would be a correct solution?