ExternalInterface not linking javascript and actionscript 3 -


none of similar answered questions fixed problem, here goes. want call actionscript 3 function javascript in ff error console says function i'm calling js not exist. says functions mover , mout not defined.

here js functions in js file

function getflashmovieobject(moviename) {     var isie = navigator.appname.indexof("microsoft") != -1;     return (isie) ? window[moviename] : document[moviename]; } function playf() { getflashmovieobject("button2").mover(); } function playb() { getflashmovieobject("button2").mout(); } 

here's code in html

<object style="width: 413px; height: 76px;" id="button2" onmouseover="playf()"  onmouseout="playb()">     <param name="movie" value="homepage/flash/button2.swf">     <param value="transparent" name="wmode"/>     <param value="false" name="loop"/>               <embed wmode="transparent" play=false src="homepage/flash/button2.swf" width="413" height="76" loop="false" swliveconnect="true" name="button2"></embed> </object> 

and code in actionscript 3

ran.stop(); function mover() {     stopplayreverse(); this.addeventlistener(event.enter_frame, playforward, false, 0, true); } function mout() { stopplayforward();     this.addeventlistener(event.enter_frame, playreverse, false, 0, true); } function playreverse(e:event):void {     if (ran.currentframe == 1) {         stopplayreverse();     } else {         ran.prevframe();     } } function playforward(e:event):void {     if (ran.currentframe == ran.totalframes) {     stopplayforward(); } else {     ran.nextframe(); } } function stopplayforward():void { if (this.haseventlistener(event.enter_frame)) {     ran.removeeventlistener(event.enter_frame, playforward); } } function stopplayreverse():void {     if (this.haseventlistener(event.enter_frame)) {         ran.removeeventlistener(event.enter_frame, playreverse);     } } externalinterface.addcallback("mover", mover); externalinterface.addcallback("mout", mout); 

the idea want control mouse hovering javascript , when hover on object movie plays when hover out movie plays backwards. have movie clip on 1 layer , on other layer have actionsrcript code. can tell me i'm doing wrong? thanks

the as3 , js codes seem fine, need set allowscriptaccess flag in html code.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -