[SWFObject] SWFObject - FSCommand problem
Geoff Stearns
geoff at deconcept.com
Wed May 17 16:28:16 PDT 2006
it should be ok... i've used fscommand with swfobject before, most
notably in the js integration kit port i did.
if you want to download the source to that and see how the fscommand
works there, you can get it here:
http://blog.deconcept.com/code/intkit/
i use a different method of inserting the vbscript into the page, but
that shouldn't really matter too much.
i looked at your code, and i don't see anything wrong at first
glance... as long as the id of the object tag matches the id in the
fscommand you should be fine.
On May 17, 2006, at 5:05 PM, Charles wrote:
> I have a problem: Flash FSCommand() does not work when I use
> SWFObject to load my Flash movie.
>
> I have included my code in two(2) parts: First is the JavaScript I
> use to load my movie; second, is JavaScript is use for the
> FSCommand - this is the standard script generated by my Flash editor.
>
> When I run using the <object> . . . </object> my FSCommand() work
> with the html just fine.
> However; when I mark the <object>. . .</object> as a comment and
> use SWFObject, FSCommand() does not work.
>
> Do I need any special parameters with SWFObject to make the
> FSCommand() work?
> What do I need to do to use both SWFObject and FSCommand()?
>
> Be of good cheer,
> Charles
>
> This script is in the <head>.
> <script language="JavaScript">
> <!-- /* flash object/embed workaround */
>
> function setFlashMovie(movieSrc, movieID, movieWidth, movieHeight,
> flashVersion, movieBgColor, flashContent){
> this.movieSrc = movieSrc;
> this.movieName = movieID;
> this.movieWidth = movieWidth;
> this.movieHeight = movieHeight;
> this.flashVersion = flashVersion;
> this.movieBgColor = movieBgColor;
> this.flashContent = flashContent;
> }
>
> var flashMovie = new Array();
>
> flashMovie["mastHead"] = new setFlashMovie("mastheadWelcome.swf",
> "myMovie", "770", "100", "5", "#F1F1E3", "masthead");
> // . . .
> function setFlashObject(n){
>
> var fo = new SWFObject(flashMovie[n].movieSrc, flashMovie
> [n].movieID, flashMovie[n].movieWidth, flashMovie[n].movieHeight,
> flashMovie[n].flashVersion, flashMovie[n].movieBgColor);
> fo.addParam("quality", "best");
> fo.addParam("wmode", "transparent");
> fo.write(flashMovie[n].flashContent);
> }
>
> -->
> </script>
> This script and html are in the <body>.
> <script language=JavaScript>
> <!--
> var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
>
> function myMovie_DoFSCommand(command, args) {
> var myMovieObj = InternetExplorer ? myMovie : document.myMovie;
> if(command == "TopMenuButton")TopMenuButton(args);
> }
>
> if (navigator.appName && navigator.appName.indexOf("Microsoft") !=
> -1 &&
> navigator.userAgent.indexOf("Windows") != -1 &&
> navigator.userAgent.indexOf("Windows 3.1") == -1) {
> document.write('<script language=VBScript\> \n');
> document.write('on error resume next \n');
> document.write('Sub myMovie_FSCommand(ByVal command, ByVal args)\n');
> document.write(' call myMovie_DoFSCommand(command, args)\n');
> document.write('end sub\n');
> document.write('</script\> \n');
> }
> //-->
> </script>
>
> <div id="masthead" name="masthead" style="position:absolute; width:
> 770px; height: 100px; z-index:100; left: 0px; top: 0px; visibility:
> visible">
>
> <!--
> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
> codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/
> swflash.cab#version=5,0,0,0" id=myMovie width=770 height=100>
> <param name=movie value="../Flash/mastheadWelcome.swf">
> <param name=quality value=high>
> <param name=wmode value=transparent>
> <param name=bgcolor value=#E9E9DB>
> <embed src="../Flash/mastheadWelcome.swf" quality=high
> wmode=transparent bgcolor=#F1F1E3 width=770 height=100
> swliveconnect=true name=myMovie type="application/x-shockwave-
> flash" pluginspage="http://www.macromedia.com/shockwave/download/
> index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object>
> -->
> </div>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deconcept.com/pipermail/swfobject-deconcept.com/attachments/20060517/61bae469/attachment-0005.htm>
More information about the Swfobject
mailing list