Catch flash hotspot custom event

  • Hi,

    Is it possible to catch a custom event dispatched by a flash hotspot ?

    My hotspot.fla

    ...

    disptachEvent(new RegardEvent(RegardEvent.CLICKED));

    ...


    My krpanoas3interface stuff

    var tmp = krpano.get("hotspot[test]");
    tmp.addEventListener(RegardEvent.CLICKED, handlerFunction);

    Thanks ?

    Regards

  • Thanks Zephyr for this trick, but your solution require that the dispatch is done in the krpano as3 interface.

    The hotspot i have design is composed of a drop down menu, and had to dispatch himself the special event, not the krpano interface.

  • Then the dropdown menu SWF should dispatch his own event. I usually use the stage as mediator.

    Dropdown menu:

    Code
    stage.disptachEvent(new RegardEvent(RegardEvent.CLICKED));

    your other SWF

    Code
    stage.addEventListener(RegardEvent.CLICKED, handlerFunction);

    or you could register custom functions on your krpan interface swf

    your krpanointerface swf:

    and then your dropdown menu swf does this:

    Code
    krpano.call('plugin[krpanointerface].testfunction1()")

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!