Copy link to clipboard
Copied
I am trying to embed a .swf with a transparent background into an XHTML file. The only answer I've found so far is to use <param name="wmode" value="transparent"> in the object params and wmode="transparent" in the embed tag. Using that code, the entire .swf file goes transparent including the icons. I also read to use "export html" in Flash (using transparent windowless in the settings) but that provides me with a huge .html file to make it transparent which is no use to me. I need to import/embed it into my homepage using a few lines of code. Any help would be much appreciated.
I don't think you are listening to what I am saying. The embedding code you are using is ancient and will not work with newer browsers, and as you have it, it would be incomplete even in those ancient times.
You do not have to use the page that Flash produces when you publish an html page. You can copy and paste that code in place of what you have now that is not working. CS6 provides a more efficient bit of embedding code than CS4 will, but even CS4 will provide something better than what y
...Copy link to clipboard
Copied
Setting the parameter values as you stated is correct, though if you are using an <embed> set of tags that sounds a bit old to be viable for modern browsers. What version of Flash are you using to publish the html code?
Copy link to clipboard
Copied
CS4
Copy link to clipboard
Copied
Here is the HTML code I'm using to import the .swf file:
<div class="navbarIcons">
<object width="400" height="100">
<param name="movie" value="navbarIcons.swf">
<embed src="navbarIcons.swf" width="400" height="100"> </embed>
</object>
</div>
If you know of an easier way to do this and have the transparent background work I'm all ears.
Copy link to clipboard
Copied
Here is the code I'm using for my navigation bar logo, and it's not showing up at all:
html:
</div>
<div class="navbarLogo">
<img src = "images/navbarLogo.png" width="300 height="150">
</div>
css:
.navbarLogo {
position: fixed;
bottom: 25px;
left: 15px;
z-index: 3;
}
It's basically the same as the code for the navbarIcons but uses img src instead of embed. No idea why my logo's not showing up.
Copy link to clipboard
Copied
That swf embedding code is the old(est) version and even as that it is far from complete. Using CS4 should produce a better result than that.
What you might try is to download the trial version of Flash CS6 (while it is still available) and make use of that for the latest in the way of Flash embedding code.
As far as your logo goes, try asking about that in the web design or Dreamweaver forum. The embedding code is not an AS3 issue as it is... but the logo issue definitely is nothing to post about in an AS3 forum.
Copy link to clipboard
Copied
I prefer to use the CS4 version I already have. It's new enough that I wouldn't be able to do much more by using a trial version of CS6.
I also think you're misunderstanding what I'm saying. The swf embedding code I am using I found on a thread in a forum as a way to import flash. I'm not using the html file that flash generates, but need to import it into an html file I already have with a transparent background. When you choose windowless transparent in the flash/html export settings it generates an html file that I don't even want. What would you recommend as an easy way to import an swf navigation bar file with the background transparent and place it on top of another swf file using a div tag & css to position it. This seems to be the easiest way I've found to do this so it can be fixed at the bottom right corner of the browser window regardless of the window size. I couldn't find a way to position it that way in Flash.
Copy link to clipboard
Copied
I don't think you are listening to what I am saying. The embedding code you are using is ancient and will not work with newer browsers, and as you have it, it would be incomplete even in those ancient times.
You do not have to use the page that Flash produces when you publish an html page. You can copy and paste that code in place of what you have now that is not working. CS6 provides a more efficient bit of embedding code than CS4 will, but even CS4 will provide something better than what you are using.
Copy link to clipboard
Copied
I am listening to you and was letting you know that the code that I am trying to use is probably from an old forum. The code that Flash CS4 cranks out is about 10 pages long which seems a little much just to import an .swf with a transparent background. I don't imagine CS6 would be much shorter.
From what I gathered, the html file checks to see what version of Flash you're using as well as what browser. The code for that is insane in my opinion and I am trying to keep my html file for my homepage rather small. I had no problem importing this in DW with a transparent background (when I was using DW) but am using Komodo Edit as my HTML editor now as it didn't come with Production Premium that I just got.
If you know the correct (newer) code, that would import an .swf with a transparency, that would be most be useful. If not I guess I'll just wait for someone to reply that does.
I will try to extract the code from the CS4 HTML file and use that, but did already try it once and it didn't work. If all else fails, I'll just download a trial version of DW and/or Flash CS6 and see if I can figure out how I did it on a website I developed a couple years ago (that I lost the files from in a HD crash).
Find more inspiration, events, and resources on the new Adobe Community
Explore Now