flash embeding and validation

Discussion in 'HTML & Website Design' started by vlad230, Sep 15, 2007.

  1. #1
    Hello!

    Guys, I need your help on something...
    I made a flash animation and I embedded it into a .php document...
    Here's the code I've used:

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="560" height="50" title="flash">
          <param name="movie" value="images/menu.swf" />
          <param name="quality" value="high" />
          <param name="wmode" value="transparent" />
          <embed src="images/menu.swf" width="560" height="50" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>
    	  </object>
    Code (markup):
    That is the code that Dreamweaver 8 generates for flash.

    When I go and check the page validation @ http://validator.w3.org it says: "This page is not Valid XHTML 1.0 Transitional!" :confused: And it generates exactly 8 errors which are related to the attributes form the flash embedding.

    BTW, I'm using this type of document:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    Code (markup):
    I'm also using a .css styles sheet. Do I have to define the embedding of the animation in the .css file?

    What should I do to make the page valid?

    Thanks,
    Vlad
     
    vlad230, Sep 15, 2007 IP
  2. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well, I don't know sh*t about php, but your problem is probably the <embed> tag.

    Netscape I think invented that one, and it's not a valid tag.

    There is a way to totally keep the Flash under the valid <object> tag, and on top of that you can make it accessable by having a png or gif underneath the Flash so something shows up for people without Flash Player, and the image can have alt text for people with images turned off...

    
    <object type="application/x-shockwave-flash" data="nameofmovie.swf" 
    width="whatever" height="whatever">
    <param name="movie" value="nameofyour.swf" />
    <img src="pictureofsomething.gif" 
    width="whatever" height="whatever" alt="alt text here" />
    </object>	
    
    Code (markup):
    Width and height are numbers only, nameofmovie is of course the Flash film. In IE browsers, they will load the whole movie first before playing it. You can overcome this if it's important by putting the movie you want to play in another Flash film which does nothing but ActionScript (so I bet there's a way to do this with just Javascript instead of having two movies) which tells the main movie to load.

    I got this from a site called Satay Flash or Flash Satay, I forget. Google it. But anyway, this should keep your xhtml valid, and should also play your movie.
     
    Stomme poes, Sep 15, 2007 IP
  3. vlad230

    vlad230 Active Member

    Messages:
    544
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    95
    #3
    Thanks A LOT man! It validates perfectly now :)
    Rep added ;)
     
    vlad230, Sep 15, 2007 IP