PDA

Click to See Complete Forum and Search --> : ExternalInterface with Adobe AC_FL_RunContent



happyeyeball
11-25-2006, 11:15 PM
Hi all,

Hit a wall with ExternalInterface and the Adobe/Macromedia fix for the IE ActiveX activation problem, "AC_FL_RunContent."

So far, I've been using ExternalInterface fine. Example of how it's been set up:

javascript start ************
function thisMovie(movieName) {
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[movieName] : document[movieName];
}

function stopThePlayer() {
thisMovie("SearchPlayer").stopFromExternal();
}
javascript end ***********
html start ***************
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="383" height="214" id="SearchPlayer" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="SearchPlayer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#017cac" /><embed src="SearchPlayer.swf" quality="high" bgcolor="#017cac" width="383" height="214" name="SearchPlayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
html end *************

So that's fine. I have the ExternalInterface.addCallback in the Flash 8 swf and all's well. Calls the function in the swf very nicely.

Now I've started to use the AC-FL-RunContent method of loading the swf so I don't get the "click here to activate" nonsense on IE browsers. But...

Now the ExternalInterface thing is broken. Here's the replacement html code (javascript remains the same):
html begin ************
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','383','height ','214','id','SearchPlayer','align','middle','src' ,'SearchPlayer','quality','high','bgcolor','#017ca c','name','SearchPlayer','allowscriptaccess','same Domain','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','SearchPlayer' ); //end AC code
</script>
html end **************

Fine for the activex problem, but now my function call to the swf isn't recongnized (probably 'cause the swf isn't directly embedded in the html document).

I need to be able to address the swf at any time, not just the beginning, else I'd just pass parameters. Any ideas would be MUCH appreciated.

With thanks in advance, Jeffrey
http://www.lineardesign.net
:faded:

neodks
12-15-2006, 08:53 AM
Hi all,

Hit a wall with ExternalInterface and the Adobe/Macromedia fix for the IE ActiveX activation problem, "AC_FL_RunContent."

So far, I've been using ExternalInterface fine. Example of how it's been set up:

javascript start ************
function thisMovie(movieName) {
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[movieName] : document[movieName];
}

function stopThePlayer() {
thisMovie("SearchPlayer").stopFromExternal();
}
javascript end ***********
html start ***************
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="383" height="214" id="SearchPlayer" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="SearchPlayer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#017cac" /><embed src="SearchPlayer.swf" quality="high" bgcolor="#017cac" width="383" height="214" name="SearchPlayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
html end *************

So that's fine. I have the ExternalInterface.addCallback in the Flash 8 swf and all's well. Calls the function in the swf very nicely.

Now I've started to use the AC-FL-RunContent method of loading the swf so I don't get the "click here to activate" nonsense on IE browsers. But...

Now the ExternalInterface thing is broken. Here's the replacement html code (javascript remains the same):
html begin ************
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','383','height ','214','id','SearchPlayer','align','middle','src' ,'SearchPlayer','quality','high','bgcolor','#017ca c','name','SearchPlayer','allowscriptaccess','same Domain','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','SearchPlayer' ); //end AC code
</script>
html end **************

Fine for the activex problem, but now my function call to the swf isn't recongnized (probably 'cause the swf isn't directly embedded in the html document).

I need to be able to address the swf at any time, not just the beginning, else I'd just pass parameters. Any ideas would be MUCH appreciated.

With thanks in advance, Jeffrey
http://www.lineardesign.net
:faded:
hello, happyeyeball, try to use the SWFObject, it os avaliable in http://blog.deconcept.com/swfobject/ .

cheers

Pedro Gabriel

happyeyeball
12-15-2006, 09:49 AM
Many thanks, Pedro!

JDF