SWFObject embedding issues

swfobject I had found issues utilizing the Deconcept site implementation, the original creators of SWFObject. My issue arose when trying to add variables and transparency to the object with version 2. This was their suggestion:

<div id="flashcontent">
  This content is replaced by the Flash movie.
</div>
<script type="text/javascript">
   var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
   so.write("flashcontent");
</script>

For some reason I was getting a JavaScript error. The implementation that worked for me:

<script type="text/javascript">
var flashvars = {
  name1: "hello",
  name2: "world",
  name3: "foobar"
};
var params = {
  scale = "noscale"; 
  wmode = "transparent";
};
var attributes = {
  id: "myDynamicContent",
  name: "myDynamicContent"
};
swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0",
"expressInstall.swf", flashvars, params, attributes);
</script>

I found the better code at these locations:

For some reason the example code is not up front and center as it should be.

FlashVars, SWFObject 2.2, addParam.

 

Your rating: None Average: 1 (1 vote)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Problem with code

Hi there, For some reason the transparency on my flash file does not work when I use swf object 2.2. Do you have any suggestions? Here is the page:http://d554778.u67.duvalldesigns.com/Any help or ideas would be greatly appreciated.

link not working

Jon, It looks like there is an issue with the link.  If you could provide the new location we may be able to help.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options