01-23-2009 12:50 PM
I have some problems to get access to the modules after i load my swf with the BEML Swf loader.
I used the setInterface function as described in your online documentation and add die LIsteners "templateready" for the player and the experience module. But sometimes the Events will be fired but sometimes not, that means my further code will be executed irregulary.
Is there any workaround for this?
Alex
Solved! Go to Solution.
01-23-2009 01:15 PM - edited 01-23-2009 01:16 PM
Hi --
Can you let me know what your setInterface() function looks like? It sounds like you might need to check to see if the 'templateReady' event has already been fired or not. Your method body should look like:
public function setInterface(player:Object):void { mPlayer = player; var exp:Object = mPlayer.getModule("experience"); var module:Object = mPlayer.getModule("experience"); if (module.getReady()) { init(); } else { module.addEventListener("templateReady", onTemplateReady); } } private function onTemplateReady(event:Event):void { var module:Object = mPlayer.getModule("experience"); module.removeEventListener("templateReady", onTemplateReady); init(); }
Where init() is the main method to begin interacting with the player.
HTH.
ashley
Brightcove Inc., a leading global provider of cloud content services, provides a family of products used to publish and distribute the world's professional digital media. The company's products include Brightcove Video Cloud, the market-leading online video platform, and Brightcove App Cloud, the pioneering content app platform. Together, more than 4,200 customers in 50 countries rely on Brightcove's cloud content services to build and operate exceptional media experiences across PCs, smartphones, tablets and connected TVs.
Brightcove Inc.
© 2012 Brightcove Inc.
