Solved

Adding wmode=transparent to SWFOBJECT

Posted on 2009-05-18
6
4,745 Views
Last Modified: 2012-05-07
I want to add the wmode=transparent parameter to swfobject.

Below is my current code, which does not seem to actually turn on transparent mode.

You can see the item page I'm  using it at here... and that transparent isn't on because you can see when rollover the QTY discountn button in FF you can't see thru the flash to see the box that pops up.

http://www.versatables.com/pages/products/school/aj30xx-test3.php#


<script type="text/javascript">
swfobject.embedSWF("http://www.versatables.com/media/flash/swf/CTL30-DEMO-09-LOAD.swf", "myContent", "300", "320", "7.0.0", "expressInstall.swf");
so.addParam("wmode", "transparent"); 
so.write("flashcontent");
</script>

Open in new window

0
Comment
Question by:cstormer
6 Comments
 
LVL 10

Expert Comment

by:Phatzer
ID: 24415997
The object holds parameters and the embed object (generally). I think when I tried this a while back, the wmode="transparent" must remain as a param, but also inside the embed tag for it to work cross-browser. As you are using javascript, however I cannot help you any further than provide this input.
0
 
LVL 16

Expert Comment

by:s8web
ID: 24416518
I think your

"swfobject.embedSWF" might be causing your issue.

Try my snippet and see what happens.

    <script type="text/javascript">
    var so = new SWFObject("pathto.swf", "swfname", "width", "height", "version", "#bgdcolor");
    so.addParam("wmode", "transparent");			
    so.write("flashcontent");
    </script>

Open in new window

0
 
LVL 16

Expert Comment

by:s8web
ID: 24416526
"#bgdcolor" will be ignored, give it a value anyway
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 42

Accepted Solution

by:
David S. earned 500 total points
ID: 24416812
so.addParam("wmode", "transparent");   is for older versions of that script.

Replace those 3 function calls with this one:
swfobject.embedSWF("http://www.versatables.com/media/flash/swf/CTL30-DEMO-09-LOAD.swf", "myContent", "300", "320", "7.0.0", "expressInstall.swf", {}, {wmode:"transparent"});

Open in new window

0
 

Author Comment

by:cstormer
ID: 24416815
No that doesn't seem to work.. nothing comes up when I run that...
0
 

Author Comment

by:cstormer
ID: 24416833
Sorry let me try that last one.
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question