SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Jan 2007
    Posts
    967
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question about swfObject

    Hi All,

    The swfObject script is usually pretty easy to use. I'm using it because the Flash is coming to the top when it shouldn't be. I'm having a lot of difficulty getting it to work with a video player that requires parameters.

    Here is the original script"
    Code HTML4Strict:
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','300','height','250','id','FLVPlayer','src','FLVPlayer_Progressive','flashvars','&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName=video/babycarrier&autoPlay=true&autoRewind=false','quality','high','scale','noscale','name','FLVPlayer','salign','lt','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','FLVPlayer_Progressive' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="300" height="250" id="FLVPlayer">
          <param name="movie" value="FLVPlayer_Progressive.swf" />
          <param name="salign" value="lt" />
          <param name="quality" value="high" />
          <param name="scale" value="noscale" />
          <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName=video/babycarrier&autoPlay=true&autoRewind=false" />
          <embed src="FLVPlayer_Progressive.swf" flashvars="&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName=video/babycarrier&autoPlay=true&autoRewind=false" quality="high" scale="noscale" width="300" height="250" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />      
    </object></noscript>


    Here is what I have so far for SWFObject code:
    Code JavaScript:
    <script type="text/javascript">
     
    	var flashvars = {
     
     
    	};
     
    		var params = {
    		  movie: "FLVPlayer_Progressive.swf",
    		  salign: "lt",
    		  quality: "high",
    		  scale: "noscale",
    		  FlashVars: 'streamName=video/babycarrier.flv'
     
    		};
    		var attributes = {
    		 movie: "FLVPlayer_Progressive.swf",
    		  salign: "lt",
    		  quality: "high",
    		  scale: "noscale",
    		  FlashVars: "streamName=video/babycarrier.flv"
     
    		  };
     
     
     
    		swfobject.embedSWF("Clear_Skin_1.swf", "current_video", "320", "240", "9.0.0", flashvars, params, attributes);
     
    	</script>

    Does anyone know what I'm doing wrong here?
    Thanks.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,702
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    It seems from the original code that the attributes should be as follows

    Code javascript:
    var attributes = {
        MM_ComponentVersion: '1',
        skinName: 'Clear_Skin_1',
        streamName: 'video/babycarrier',
        autoPlay: 'true',
        autoRewind: 'false'
    };
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Guru
    Join Date
    Jan 2007
    Posts
    967
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thank You, but that didn't work.
    The video isn't getting passed. Does anyone know an alternative method that may be simpler to play an flv file.

    Thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •