Add Flash to CSS

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Nov 29th, 2005, 20:59
csa csa is offline
Up'n'Coming Member
Join Date: Nov 2005
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
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>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Nov 29th, 2005, 21:53
SuperMember

SuperMember
Join Date: Nov 2005
Location: England
Age: 27
Posts: 309
Thanks: 1
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Nov 29th, 2005, 22:37
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Nov 29th, 2005, 23:55
SuperMember

SuperMember
Join Date: Nov 2005
Location: England
Age: 27
Posts: 309
Thanks: 1
Thanked 0 Times in 0 Posts
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Nov 30th, 2005, 03:06
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Nov 30th, 2005, 09:46
csa csa is offline
Up'n'Coming Member
Join Date: Nov 2005
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Nov 30th, 2005, 14:23
SuperMember

SuperMember
Join Date: Nov 2005
Location: England
Age: 27
Posts: 309
Thanks: 1
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Nov 30th, 2005, 14:33
SuperMember

SuperMember
Join Date: Nov 2005
Location: England
Age: 27
Posts: 309
Thanks: 1
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Dec 1st, 2005, 14:07
csa csa is offline
Up'n'Coming Member
Join Date: Nov 2005
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
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;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Dec 1st, 2005, 17:01
SuperMember

SuperMember
Join Date: Nov 2005
Location: England
Age: 27
Posts: 309
Thanks: 1
Thanked 0 Times in 0 Posts
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Dec 2nd, 2005, 10:13
csa csa is offline
Up'n'Coming Member
Join Date: Nov 2005
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
add, flash, css

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 00:31.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42