This is a discussion on "Add Flash to CSS" within the Web Page Design section. This forum, and the thread "Add Flash to CSS are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Add Flash to CSS
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Add Flash to CSS
I'm embedded the following flash but of course it isn't CSS friendly. Can it be made to be
div id="estimatorbedrooms"> <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/s...rsion=6,0,29,0" width="356" height="82"> <param name="movie" value="http://www.webforumz.com/images/vans.swf"> <param name="quality" value="high"> <embed src="http://www.webforumz.com/images/vans.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="356" height="82"></embed> </object> </div> |
|
|
|
#2
|
|||
|
|||
|
Re: Add Flash to CSS
This is my current predicament too. View my thread, which is above this one.
I'm trying to make my homepage xhtml strict compliant whilst having 3 flash swf's on it. I found this tutorial that says there is the 'flash satay method' and another one, which it explains - the one i've used. http://blog.deconcept.com/2004/10/14...ect-and-embed/ It works for one swf within the div u label "flashcontent" but if u got more than 1, like me, it goes belly up. Hope this helps and that somebody comes up with a solution to my problem. |
|
#3
|
||||
|
||||
|
Re: Add Flash to CSS
Quote:
Of course, I'm just guessing here... |
|
#4
|
|||
|
|||
|
Re: Add Flash to CSS
OK. Lots of help and news here...
It went belly up cos I had 3 swfs to get on my homepage whilst remaining valid. It went wrong cos I had assumed that all these divs had to be called "flashcontent" whereas in fact they just have to match what's inside the javascript: <div id="flashcontent"> You must download the Flash plugin or allow Javascript to view this content! <script type="text/javascript"> var fo = new FlashObject("homemenubar.swf", "homemenubar", "800", "40", "7", "#333333"); fo.write("flashcontent"); </script> </div> That's the code you stick into your html doc. You also have to put a link to the script in the <head>. Just look at my site CSA. If u want more info on what u can and can't do with the above code just ask or look at the site i gave u earlier. You'll see that for the other 2 swf's I've simply changed to "flashcontent2" & "flashcontent3". Problem solved. This solution also allows u to specify the bground colour of the swf and so keeps me happy! NOW... My site (homepage at least) PASSES Strict Validation and CSS. It's completelt table-less and so I've fulfilled my goal of doing this b4 December. www.crewsfx.com I should now win the Comp, which would be the only antidote to the immense pain I feel after complying with these stupid guidelines!!!!!!!!!!!!!!!! Cheers everyone whose helped! |
|
#5
|
||||
|
||||
|
Re: Add Flash to CSS
It sort of sounds like my guess was right; was it failing validation because you were using the same ID more than once? Now that you've changed the ID names, it passes? Or was it something else?
|
|
#6
|
|||
|
|||
|
Re: Add Flash to CSS
What am I doing wrong folks?
I've placed the following in the head <script type="text/javascript" src="flashobject.js"></script> And the below is one of two flash files (but I haven't added the second as yet). Do I need to add something into my Flash file? the error message I get when viewing the page is: 'FlashObject undefined' which appears in the browser window. <div id="estimatorbedrooms"> You must download the Flash plugin or allow Javascript to view this content! <script type="text/javascript"> var fo = new FlashObject("bedrooms.swf", "homemenubar", "800", "40", "7", "#333333"); fo.write("flashcontent"); </script> </div> Cheers |
|
#7
|
|||
|
|||
|
Re: Add Flash to CSS
You have to match your div id, which u called "estimatorbedrooms", with fo.write("flashcontent");
So u could do 1 of 2 things. Either change your div name to "flashcontent" or change fo.write("estimatorbedrooms"); What's happening is the Javascript is replacing whatever you place inside the div container. So u can put text or a replacement image in its place (same dimensions as Flash recommended) so that if user doesn't have flash or has disabled javascript that's what they see. U don't have to put anything inside the div if u don't want, just ensure u actually have this div and that u call it the same as what u refer to it in the java code. This is why with my site, cos i've got 3 flash files on one page, I've had to rename each div and make the fo.write correspond to them. You're also going to have to change some more of that code for yours to display correctly. var fo = new FlashObject("bedrooms.swf", "homemenubar", "800", "40", "7", "#333333"); Firstly, change "homemenubar" to "bedrooms". The next two numbers (800 & 40) are the dimensions of my menu bar. Change these to the exact dimensions of your bedroom.swf. The number 7 means the user has to have Flash 7 installed or higher. Change it to 6 if u can. The final hex value is the background colour of the swf, which u want to change to the background colour of your html page (mine's dark grey). Another thing u gotta make sure of is that u place the "flashobject.js" inside the folder in which your html resides. Hope u get it. I'll explain more if need be. Last edited by timmytots; Nov 30th, 2005 at 14:34. |
|
#8
|
|||
|
|||
|
Re: Add Flash to CSS
Quote:
It now works perfect, means i can put replacement images in if they don't have flash, and eliminates code. |
|
#9
|
|||
|
|||
|
Re: Add Flash to CSS
Still not working
<script type="text/javascript" src="flashobject.js"></script> <div id="estimatorbedrooms"> You must download the Flash plugin or allow Javascript to view this content! <script type="text/javascript"> var fo = new FlashObject("bedrooms.swf", "bedrooms", "356", "82", "7", "#ffffff"); fo.write("estimatorbedrooms"); </script> </div> my css style is set to: #estimatorbedrooms{ width: 356px; height: 82px; |
|
#10
|
|||
|
|||
|
Re: Add Flash to CSS
You DO NOT need to put anything in the CSS.
Once again: Another thing u gotta make sure of is that u place the "flashobject.js" inside the folder in which your html resides. Have u actually downloaded the flashobject.js file? |
|
#11
|
|||
|
|||
|
Re: Add Flash to CSS
Sorry TT, it was me being an ar*e and not downloading the plugin
Cheers for you help, all working now! |
![]() |
| Tags |
| add, flash, css |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sr. Flash Developer > SynCruiser Flash Widget | ipanema | Job Opportunities | 0 | Apr 10th, 2008 23:20 |
| Flash Designer (Central London, Flash, Flash Games, Flash banners, 22K-28K) | CapitalStrategy | Job Opportunities | 0 | Aug 13th, 2007 09:39 |
| Flash Designer (Central London, Flash, Flash Games, Flash banners, 22K-28K) | CapitalStrategy | Job Opportunities | 0 | Aug 13th, 2007 09:04 |
| playing flash within flash with slow internet connection | bejamshi | Flash & Multimedia Forum | 4 | Jan 19th, 2007 02:07 |