Reply
Visitor
phil_n
Posts: 7
Registered: ‎08-26-2010
0 Kudos
Accepted Solution

custom swfloader events

hi!

 

i was wondering if it is possible to dispatch events in my custom swfloader and then catch it in the javascript api.

 

something like this:

 

//this function is inside my swfloader

private function onMouseLeave(evt:Event)
{
dispatchEvent(new Event("elementRollOut"));
}

 

//this function is inside my html javascript code:

function onTemplateReady_FLASH(event) {
modExp.removeEventListener(brightcove.api.events.ExperienceEvent.TEMPLATE_READY, onTemplateReady_FLASH);

mouseHandler = modExp.getElementByID("mouseHandler");
mouseHandler .addEventListener('elementRollOver', onOverlayRollOver);
mouseHandler .addEventListener('elementRollOut', onOverlayRollOut);

 

 

 

 

 

thanks, philipp

 

Brightcove Team
BC-Oscar
Posts: 503
Registered: ‎12-11-2008
0 Kudos

Re: custom swfloader events

 

  There is no native support in the BC API for this but you can use the native ExternalInterface Flash Player API to call a JS function in your page from your SWF plugin