|
|
 |
November 29th, 2005, 04:59 PM
|
#1
|
|
WebForumz Member
Join Date: Nov 2005
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Add Flash to CSS
I'm embedded the following flash but of course it isn't CSS friendly. Can it be made to be  Thanks
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>
|
|
|
November 29th, 2005, 05:53 PM
|
#2
|
|
Reputable Member
SuperMember
Join Date: Nov 2005
Location: England
Age: 29
Posts: 323
Thanks: 1
Thanked 1 Time in 1 Post
Rep Altering Power: 0
|
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.
|
|
|
November 29th, 2005, 06:37 PM
|
#3
|
|
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 89
Posts: 563
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Add Flash to CSS
Quote:
|
Originally Posted by timmytots
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.
|
How is it going belly up? Validation wise? If so, are you using multiple <div>'s with the same id="xxx" name? If so, change them to classes: class="xxx".
Of course, I'm just guessing here...
|
|
|
November 29th, 2005, 07:55 PM
|
#4
|
|
Reputable Member
SuperMember
Join Date: Nov 2005
Location: England
Age: 29
Posts: 323
Thanks: 1
Thanked 1 Time in 1 Post
Rep Altering Power: 0
|
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! 
|
|
|
November 29th, 2005, 11:06 PM
|
#5
|
|
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 89
Posts: 563
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
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?
|
|
|
November 30th, 2005, 05:46 AM
|
#6
|
|
WebForumz Member
Join Date: Nov 2005
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
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
|
|
|
November 30th, 2005, 10:23 AM
|
#7
|
|
Reputable Member
SuperMember
Join Date: Nov 2005
Location: England
Age: 29
Posts: 323
Thanks: 1
Thanked 1 Time in 1 Post
Rep Altering Power: 0
|
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; November 30th, 2005 at 10:34 AM..
|
|
|
November 30th, 2005, 10:33 AM
|
#8
|
|
Reputable Member
SuperMember
Join Date: Nov 2005
Location: England
Age: 29
Posts: 323
Thanks: 1
Thanked 1 Time in 1 Post
Rep Altering Power: 0
|
Re: Add Flash to CSS
Quote:
|
Originally Posted by herkalees
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?
|
Yes. It wasn't just failing validation, it wasn't working full stop. Because yes, i had made 3 id's all named the same. I've changed the id names and, as explained in previous comment, made what's inside the javascript correspond to the div name.
It now works perfect, means i can put replacement images in if they don't have flash, and eliminates code.
|
|
|
December 1st, 2005, 10:07 AM
|
#9
|
|
WebForumz Member
Join Date: Nov 2005
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Add Flash to CSS
Still not working  Still get 'FlashObject is undefined'.
<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;
|
|
|
December 1st, 2005, 01:01 PM
|
#10
|
|
Reputable Member
SuperMember
Join Date: Nov 2005
Location: England
Age: 29
Posts: 323
Thanks: 1
Thanked 1 Time in 1 Post
Rep Altering Power: 0
|
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?
|
|
|
December 2nd, 2005, 06:13 AM
|
#11
|
|
WebForumz Member
Join Date: Nov 2005
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
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!
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|