You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Thursday, July 14th 2011, 2:46pm

event onpreviewcomplete lost

Hi,

I'm trying to developp a plugin in as3, but I have a little problem.

In the initialisation of my plugin, I set an onpreviewcomplete event :

Source code

1
krpano.set("events.onpreviewcomplete", clear_transition);


Then I load a new panorama from my plugin.

The problem is when an onpreviewcomplete event exist in the xml of the new panorama, it replace the one I created in my plugin and never call my function.

Is there a way to keep the event in the new panorama and add the call of my funcion clear_transition ? I want to do it in my as3 code, and not adding it in the xml.

I have thought adding an event onxmlcomplete in my plugin that will get the onpreviewcomplete event from the new xml and add my function but, if the onxmlcomplete event exists in the new xml, it will also replace the one from my plugin.

Thanks

Yannick

2

Thursday, July 14th 2011, 3:16pm

Hi,

the 1.0.8.14 version provides also 'named events',

with them it would be possible to define separated custom events,

e.g. in AS3:

Source code

1
2
krpano.set("events[myevents].keep", true);
krpano.set("events[myevents].onpreviewcomplete", clear_transition);


best regards,
Klaus

3

Thursday, July 14th 2011, 3:21pm

Thanks a lot Klaus,

it works well.

Yannick