I need to interact with the resulting Flash movie built by the media plugin. However, I'm unable to target it nicely without an unique identifier. I'd rather not DOM walk and test for object or embeds as there are other movies loaded on the page. How best to assign an id or name to the resulting object or embed?
The mouseout event of the containing div needs to call the Flash movie's function "send_alertToFlash()" so far I have... ...{ function collMenu(){$(this)child[0].send_alertToFlash();} var config = {sensitivity:10,interval:1,over:expandMenu,timeout: 200,out:collMenu}; $('#mainNav').hoverIntent( config ); }); which doesn't work. "... send_alertToFlash is not a function" This was the code I was given which need to work with the plugin: <script language="javascript"> on_load=function(){document.getElementById ('mainNav').onmouseout=function(){ callFlashMethod() } } function getFlashMovie(movieName) { var isIE = navigator.appName.indexOf("Microsoft") != -1; return (isIE) ? window [movieName] : document[movieName]; } function callFlashMethod() { getFlashMovie ("FlashObj").send_alertToFlash(); } </script> <body onload="on_load()"> <div id="mainNav"> <embed ... name="FlashObj"> </div> </body>