PDA

View Full Version : Flash swf in CSS


Blue_Vision
04-02-2009, 07:30 AM
Typically I export an html code out of flash and use the "object" part of it and enter that into my html. Now I'm trying to redo everything I can into CSS though... so can I insert that object into the CSS file and what should it look like?

Thanks!

mangofreak
04-02-2009, 04:43 PM
I export the movie and insert it inside some div and voila. Is that what you mean?

Blue_Vision
04-02-2009, 07:25 PM
Yes, but so far I'm VERY, VERY limited in my CSS and DIV knowledge. I know how to change a background, position something, etc. But I'm not sure how the code should look to insert an object. I was hoping someone would show me some example code of how it looks...

Thanks!

Blue_Vision
04-03-2009, 07:37 PM
Here is the basic type of command that I can get working via CSS:
(totally unrelated code to what I'm trying to do, just showing my tiny understanding and simplicity)

.backDrop {
width: 700px;
background: url('images/backdrop.png');
margin-left: auto;
margin-right: auto;
left: 480px;
}

But I would like to put my flash logo (acts like a banner at the top of the webpage) into CSS if thats possible with CSS so that I don't have to insert it in every html page. Here is what the code looks like that I would put in the html page:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="280" height="162" align="middle"><param name="wmode" value="transparent"> <param name="movie" value="http://websiteblablalogo.swf"> <param name="allowScriptAccess" value="always"> <embed type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" width="280" height="162" wmode="transparent" align="middle"
src="http://websiteblablalogo.swf" allowScriptAccess="always"></embed>
</object>

Can you put an <object> in a CSS file or what is the best way to accomplish what I'm trying to do?

Thanks!

mangofreak
04-04-2009, 01:51 AM
Can you post an image of what you want to accomplish?

edbr
04-04-2009, 01:56 AM
why not use find and replace
you could do something like find <head> and replace
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="280" height="162" align="middle"><param name="wmode" value="transparent"> <param name="movie" value="http://websiteblablalogo.swf (http://websiteblablalogo.swf/)"> <param name="allowScriptAccess" value="always"> <embed type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" width="280" height="162" wmode="transparent" align="middle"
src="http://websiteblablalogo.swf (http://websiteblablalogo.swf/)" allowScriptAccess="always"></embed>
</object>
<head>

mangofreak
04-04-2009, 02:07 AM
You could easily use an include file so the include is in all your files but you manage the flash in only one file.

;)

Blue_Vision
04-04-2009, 02:19 AM
ok, I think that last post is possibly something that I'm trying to get at.

I can do "find and replace" for all my html pages but thats not my worry. I'm just trying to include everything I possibly can into one CSS page so that I can change everything, always in one place... one one page.

I'm really not sure why you would need an image. I animated our logo as a simple flash movie. I want that in that exact movie, size, position on every page I create. I want it in CSS if possible. To do that I need to insert that <object> into CSS somehow. I'm not only doing this for this "one" logo part though. I've got a little more flash on the page that I need to apply the same thing to AND I have more planned for the future.

I'm gonna send you guys a PM with a link to the current iWeb site that I'm recoding right now and asking all these questions about since you seem to be the same 2 people helping me... Its best if you view the site currently with Safari 3.2 or IE 7. Firefox renders the text like crap and screws up my flash a little.

Anyways, take a look if you like and then let me know a best idea on how to get my flash parts onto one CSS page or if I need to just manually put it into the html via find & replace software...

Thanks!

edbr
04-04-2009, 04:51 AM
yes meant to add that use the include and can still use find and replace to add it.

Blue_Vision
04-11-2009, 12:34 AM
ok... now I'm confused. I think we are talking about 2 different "find and replace" ideas and I've got no idea what "include" is or how to do that on a separate sheet?

Can u explain more on what your talking about?

I was thinking that in iWeb I have a seperate program called massreplaceit:

http://www.hexmonkeysoftware.com/

I use that program to find and replace parts of the code that I don't like that iweb generates each time after I have iweb publish the code to my desktop. Then I upload all my html pages to my server...