1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

why wont this work??

Discussion in 'CSS' started by vonculon, Oct 19, 2007.

  1. #1
    does this kind of css does not support .swf??? or what cause it will work with .png's but not with .swf
    #center {
    	border-left: #000 solid 5px;
    	border-right: #000 solid 5px;
    	width: 800px;
    	margin: 0 auto;
    	overflow: hidden; 
    	background: #000 url(http://escuadronhunter.mikekimpland.com/imagenes/encabezado.swf) top center no-repeat;}
    Code (markup):

     
    vonculon, Oct 19, 2007 IP
  2. eruct

    eruct Well-Known Member

    Messages:
    1,189
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    108
    #2
    You can't set a .swf as a background image using only css.
    You need to add your flash movie with either the traditional embed method, or if you want your movie to be called in using Javascript and replace some element of the div you could look into using something like SIFR
     
    eruct, Oct 19, 2007 IP
  3. vonculon

    vonculon Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    but if i want it to be totally centered and in top?
     
    vonculon, Oct 19, 2007 IP
  4. vonculon

    vonculon Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    and i cant use SIFR because my .swf has the menu for the web inside
     
    vonculon, Oct 19, 2007 IP
  5. vonculon

    vonculon Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i cant manage to center it without a table.. and i dont want to use tables.
     
    vonculon, Oct 19, 2007 IP
  6. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #6
    Which means you are using flash for something it NEVER should be used for. Flash should add cutesy animations, and should never be used for anything mission critical like user navigation.

    There's a reason it's called Flash and not substance.
     
    deathshadow, Oct 20, 2007 IP
    Halobitt likes this.
  7. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Sorry, but I have to call BS on the "traditional embed method" nonsense. EMBED is NOT valid HTML. If you're going to directly insert a Flash applicaiton into the Web page, you should use something like this instead, which is not only valid, but also works PERFECTLY cross-browser, even all the way back to Netscape 4 and IE 5 (like it matters).

    
    <object type="application/x-shockwave-flash" data="c.swf?path=flash-file.swf" width="520" height="390">
    	<param name="movie" value="c.swf?path=flash-file.swf" />
    </object>
    
    Code (markup):
    The c.swf file is a container file that allows for the actual Flash file to stream in Internet Explorer. It also can be used to detect which version of Flash is being used, which will prevent older Flash plugins from trying to play the actual Flash file you're streaming (though I'm not 100% sure on how to do this).

    If you don't want to use the c.swf file you can just use this instead:

    
    <object type="application/x-shockwave-flash" data="flash-file.swf" width="520" height="390">
    	<param name="movie" value="flash-file.swf" />
    </object>
    
    Code (markup):
    I also suggest that regardless of which one you use, that you always include a backup option (an image or text with a link to Adobe's Flash plugin works best) as a backup option for accessibility purposes.

    I'm also attaching a c.swf file that was made using Flash MX (way back in the day) that you can use.

    If you want to learn why and how this works, read www.alistapart.com/articles/flashsatay

    Oh, and if you're not using an XHTML DOCTYPE, remove the space and the forward slash from the PARAM element so it looks like this:

    
    <param name="movie" value="c.swf?path=flash-file.swf">
    
    <param name="movie" value="flash-file.swf">
    
    Code (markup):
     

    Attached Files:

    Dan Schulz, Oct 20, 2007 IP
  8. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #8
    And once you have the <object> in your html, it can be positioned with regular css, just like you would anything else.

    http://stommepoes.jobva.nl/Pizzaatje/pizzaatje.html has a flash banner (advertising and games are the only thing I'd use Flash for-- remember that if you want teh googles to navigate your site, they won't go through the Flash menu). I'm not using the container film as the Flash is small enough that a second or two load time for IE can bite me. I also make all ads for Flash 8 or lower, though you're probably wanting the higher Flash for funky menu button options.

    Because object tag has child elements, no Flash no problem-- the next child is shown. What I don't know is, are the children loaded or NOT if there is Flash player? Because I load a lot of stuff behind the Flash (I'm building a site with plans for a Flash image, behind that an animated gif, behind that either a still image or just text... don't want the browser loading the gif if Flash is present (looks much better than the gif)).

    Hidden behind the Flash is a png with an image from the Flash. Still advertises.
    Behind the png is alt text. No Flash, no images, no CSS? You still know what's sitting there, and it's even still advertising (for a really badly written site, so I hope no actual disabled people ever notice the ad) and it's wrapped in an <a> so it's always clickable, cause otherwise only the Flash has the button ability.

    Also:
    After putting the same whole object tag on another site, we noticed Geckos saw everything fine, but IE 6 and 7 displayed nothing, not even the child elements. Turned out that Gecko assumes the full path after the first one is written, but for data and value, IE needs the whole path written out again. Wish I'd known that before. Learning experience I guess.
     
    Stomme poes, Oct 22, 2007 IP
  9. vonculon

    vonculon Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    well the site i am doing is for aspecific group of persons i dont really want anyone not knowing it to enter so it wont matter at that and about flash i do use flash 8.. its enough for me if u want to check the site.. it is still in construction and i am testing with some newgrounds layouts.. but na im not stealing :) http://escuadronhunter.mikekimpland.com (i cant post links yet.. lol)
     
    vonculon, Oct 22, 2007 IP
  10. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #10
    After finally starting my project, I found issues... Opera will play my flash alone, but not on a website (instead plays the animated gif beneath). IE6 won't play anything, completely ignoring even the child elements (didn't do that for any of my banners). *Edit, no, IE6 from Multiple IE's from Tredosoft doesn't work... fake IE6 4 Linux and Native IE6 works, good.

    <param name="wmode" value="transparent" /> Seems a no-go for FF1.5, though fine in 2+

    So, basically, what's Opera's deal?
     
    Stomme poes, Oct 23, 2007 IP
  11. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #11
    Remember, flash is a plugin, NOT an official part of HTML/CSS - and in Opera's case they are trying to use a plugin that wasn't even written for the browser.

    Not that I would know personally, I have plugins blocked everywhere but YouTube on my own copy of opera so I never get that bullshit crap anyways.

    Not to say I also dislike the bloated pile of crap known as flash almost as much as I hate gecko...
     
    deathshadow, Oct 23, 2007 IP
  12. vonculon

    vonculon Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    vonculon, Oct 23, 2007 IP
  13. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #13
    I first started off using <object> and <param> but then clients started complaining because you have to activate those every single time in MSIE... so I'd resort to something like SWFObject to embed flash.
     
    soulscratch, Oct 23, 2007 IP
  14. vonculon

    vonculon Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    and which is the SWFObject??
     
    vonculon, Oct 25, 2007 IP
  15. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
  16. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I might have to check that out.

    My first copy of Opera for Linux had no flash which was great for testing. my sedong copy on the Blows machine at work somehow came with flash (or windows added it somehow?? cause I never did). Opera with Flash plays my Flash banners, but on a kid's site I'm making, the main character is sitting in the middle of the page and then for some reason Opera shows the object child instead. Weird. But, that's why I have the child.
     
    Stomme poes, Oct 25, 2007 IP