Hi,
I tried to make one Flex plugin for krPano today, just to see how it's working.
It's works great, except the registerEvent and updateEvent which are not triggered. However, the button is OK. I see the 'click' trace in krPano.
Here's the MXML code of my plugin :
XML
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
add="addedToStage(event)"
addedToStage="addedToStage(event)"
>
<fx:Script>
<![CDATA[
public var _krpano:krpano_as3_interface = null;
public function addedToStage(evt:Event):void
{
_krpano = krpano_as3_interface.getInstance();
_krpano.trace (1, evt);
_krpano.addPluginEventListener(this, krpano_as3_interface.PLUGINEVENT_REGISTER, registerEvent);
_krpano.addPluginEventListener(this, krpano_as3_interface.PLUGINEVENT_UPDATE, updateEvent);
}
public function registerEvent (evt:DataEvent):void
{
_krpano.trace (1, 'registerEvent');
_krpano.trace (1, evt);
_krpano.trace (1, evt.data);
}
public function updateEvent (evt:DataEvent):void
{
_krpano.trace (1, 'updateEvent');
_krpano.trace (1, evt);
_krpano.trace (1, evt.data);
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Button x="10" y="10" label="Button" click="_krpano.trace (1, 'click')" />
</s:Application>
Alles anzeigen
Klaus, do you have an idea why the functions are not triggered ?
Regards,