/    Sign up×
Community /Pin to ProfileBookmark

Using CSS and my flash file

I created a simple rollover button in flash. I hit publish and an HTML page was generated along with my SWF file (I chose transparent window when publishing the flash file). The HTML page flash generated looks fine. The button does not have a window around it and works fine.

Now I want to import this button into my CSS page. I went to Dreamweaver, clicked in my container div, then Insert>Media>flash and chose my .swf file. When I previewed the page, the transparency went away and I have a white box around my button. I do not want that. So I went back to the HTML page flash generated, copied the JavaScript that displayed the file, and pasted inside the DIV. The button didn’t appear at all.

So I’m wondering, what are the correct steps to insert a windowless (transparent) flash movie with CSS?

Thanks!

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@ryanbutlerJul 29.2009 — W/out knowing what you're trying to achieve, it reads as though you're going at something backwards. At any rate, this is pulling from my archived brain, but on the flash parameter within the html file, I believe "wmode" will give you transparency.
Copy linkTweet thisAlerts:
@Primesale2000Jul 29.2009 — Put some code on here to see if I can help..
Copy linkTweet thisAlerts:
@bzsimauthorJul 29.2009 — Sorry if my post doesn't make sense. I'll try to explain better:

[B]Step 1: [/B]I created a rollover button in Flash. I then went to Publish Settings to set it to windowless, transparent, then saved.

[B]Step 2: [/B]File > Publish. This generated a SWF and a HTML page. When I preview the HTML page, the button is windowless and looks great. It uses this code:

<html lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>buttonrollover</title>

<script language="javascript"> AC_FL_RunContent = 0; </script>

<script language="javascript"> DetectFlashVer = 0; </script>

<script src="AC_RunActiveContent.js" language="javascript"></script>

<script language="JavaScript" type="text/javascript">

<!--

// -----------------------------------------------------------------------------

// Globals

// Major version of Flash required

var requiredMajorVersion = 9;

// Minor version of Flash required

var requiredMinorVersion = 0;

// Revision of Flash required

var requiredRevision = 115;

// -----------------------------------------------------------------------------

// -->

</script>

</head>

<body bgcolor="#000000">

<!--url's used in the movie-->

<!--text used in the movie-->

<script language="JavaScript" type="text/javascript">

<!--

if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {

alert("This page requires AC_RunActiveContent.js.");

} else {

var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

if(hasRightVersion) { // if we've detected an acceptable version

// embed the flash movie

AC_FL_RunContent(

'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0',

'width', '550',

'height', '400',

'src', 'buttonrollover',

'quality', 'high',

'pluginspage', 'http://www.macromedia.com/go/getflashplayer',

'align', 'middle',

'play', 'true',

'loop', 'true',

'scale', 'showall',

'wmode', 'transparent',

'devicefont', 'false',

'id', 'buttonrollover',

'bgcolor', '#ffffff',

'name', 'buttonrollover',

'menu', 'true',

'allowScriptAccess','sameDomain',

'allowFullScreen','false',

'movie', 'buttonrollover',

'salign', ''

); //end AC code

} else { // flash is too old or we can't detect the plugin

var alternateContent = 'Alternate HTML content should be placed here.'

+ 'This content requires the Adobe Flash Player.'

+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';

document.write(alternateContent); // insert non-flash content

}

}

// -->

</script>

<noscript>

// Provide alternate content for browsers that do not support scripting

// or for those that have scripting disabled.

Alternate HTML content should be placed here. This content requires the Adobe Flash Player.

<a href="http://www.macromedia.com/go/getflash/">Get Flash</a>

</noscript>

</body>

</html>

[B]Step 3:[/B] I have a page in Dreamweaver that uses CSS that I would like to import this rollover button into. I went to Dreamweaver in my "mainContent" div, went to Insert>Media>Flash and chose the generated SWF file. When I previewed with FireFox, the button had a white window around it. Not what I want. The JavaScript is using the <object> and <embed> tag to display my button, not like the generated HTML (above).

[B]Step 4:[/B] I added <param name="wmode" value="transparent" /> to the <object> tag and wmode="transparent" to the <embed> tag. Same results. Window still there.


I even tried replacing the JavaScript code in Step 3 with the Flash generated code in Step 2, and that did not work as the button didn't show up at all.

And here I am, stuck and clueless. Hope that helps a bit.
Copy linkTweet thisAlerts:
@ryanbutlerJul 29.2009 — I have a guess, but it doesn't make sense since the active content should be solved. Do you have a page example?
×

Success!

Help @bzsim spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...