tags:

views:

439

answers:

3

In the below code can anyone explain me the all the parameters and attributes used, why all these are used and whats their meaning here.

What parameters and attributes are recommended and what are not to use with a flash tag in a HTML page.

<object id="vf_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="630" height="400"> 
      <param name="movie" value="/videos/swf/3fun.swf" /> 
      <param name="FlashVars" value="id=72" /> 
      <param name="allowScriptAccess" value="always" /> 
      <param name="loop" value="false" /> 
      <param name="menu" value="false" /> 
      <param name="quality" value="high" /> 
      <param name="wmode" value="window" /> 

      <embed name="vf_flash" src="/videos/swf/3fun.swf" FlashVars="id=72" width="630" height="400" allowScriptAccess="always" loop="false" menu="false" quality="high"  wmode="window" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> 
</object>
+4  A: 

The Adobe website has clear and concise explanations of all of these tags, including which are optional and which are required.

http://kb2.adobe.com/cps/127/tn_12701.html

Kane Wallmann
+1  A: 

Out of order, and based on memory. Verify these all before use, but it should help you wrap your head around the concepts:

  1. In the fight for monopoly over the web, Microsoft has comitted to differ from the w3c whenever possible. Therefore, the actual tag used to embed flash in IE is 'object', in all real browsers its 'embed'

It must be noted that using '1' and '0' will give you better overall consistancy than 'true' and 'false', due to this fight.

  1. loop - tells whether or not the flash player should attempt to restart the movie when it finishes playing it.

  2. FlashVars - parameters can be passed into flash, and are referred to through the flashvars unit. For example, if you create a media player that plays song1 you may pass in Flashvars="song1=song1"

  3. movie - the URL of the flash file. Keep it in the same folder as the htm file calling it, or use an absolute URL or you will hit a cross-browser issue.

  4. quality - the higher the quality the more resources flash requires to run. While the default is good, if you are worried that the player will be used on older computers, sometimes sacrifice image quality for the sake a laess jumpy experience

  5. wmode - the background opacity of the movie. Sometimes you want the movie to blend in with the background, and it gets set to "transparent", sometimes it should clearly be its own little box, "opaque" Note here that there are some easter eggs with this value, if you need it, there are some undocumented options for this value.

  6. allowScriptAccess - I actually thought this was deprecated. It changed a lot in different versions. Leave this on default.

Libraries like Mootools have classes designed for working with Flash and Jaavscript together.

Take a look here and here for the articles on A list apart on the embed vs object tags, there is a lot to be learned from it.

SamGoody
A: 

The one's that I can answer off the top of my head:

"movie" - the name of the flash file to load/view

"loop" - whether the animation plays once (false) or repeats (true)

"menu" - whether to show the full context menu (true) or not (false). Setting this to false shows the context menu, but it only has the "settings" and "about" options.

See Kane Wallmann's link for the full documentation.

ChrisF