XHTML Code to input Video and Flash?

Discussion in 'HTML & Website Design' started by fazsnatch, Jan 14, 2009.

  1. #1
    I am looking to put in some video and flash in my website. They dont have to be uploaded online as im in the learning process.

    I am just looking for some video code and also any flash code, so the website is validated in XHTML 1.0 Strict.

    Any ideas?

    Thanks
     
    fazsnatch, Jan 14, 2009 IP
  2. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #2
    This is what I use when I have to use Flash and want it to validate:

    <object data="flash.swf" type="application/x-shockwave-flash" width="xxx" height="xxx" ><param name="movie" value="flash.swf" /></object>
    Code (markup):
    Works with most browsers.
     
    Kerosene, Jan 14, 2009 IP
  3. fazsnatch

    fazsnatch Member

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    thanks mate i will give that a try

    Anyone got any idea how to put video which validates?

    Cheers
     
    fazsnatch, Jan 14, 2009 IP
  4. fazsnatch

    fazsnatch Member

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #4
    any ideas?
     
    fazsnatch, Jan 15, 2009 IP
  5. mdvasanth86

    mdvasanth86 Notable Member

    Messages:
    3,869
    Likes Received:
    285
    Best Answers:
    0
    Trophy Points:
    230
    #5
    Use both the <object> and <embed> tag.. You will get them working in all the browsers... :D
     
    mdvasanth86, Jan 15, 2009 IP
  6. cipals15

    cipals15 Well-Known Member

    Messages:
    1,085
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    100
    #6
    Try copying the embed codes of youtube and study all parts. The variables after every equal sign are either location, size and other data that can be placed. Find more information about <embed> and <object> through google search engine.
     
    cipals15, Jan 15, 2009 IP
  7. gnp

    gnp Peon

    Messages:
    137
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #7
    The embed element is not part of the xhtml 1 strict DTD so it will not validate as such.
    The object element is though, so use that one.

    What kerosene posted, a few posts above, should be enough.

    In order now to validate the url of the video, you will need to make sure you encode it for URL usage.

    that would mainly mean to change the & found in the video url to &amp;


    take care
     
    gnp, Jan 15, 2009 IP
  8. fazsnatch

    fazsnatch Member

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #8
    Is there any chance you can write me up an example?

    I am just really confused of this stage of my html learning lol
     
    fazsnatch, Jan 15, 2009 IP
  9. gnp

    gnp Peon

    Messages:
    137
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Doesn't the post by Kerosene (a few posts up) work for you ?

    in his code you will see the "flash.swf" twice.

    You need to replace that with the filename of your own flash video ..
     
    gnp, Jan 15, 2009 IP
  10. fazsnatch

    fazsnatch Member

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #10
    sorry mate i meant for the video, it is a .avi file...the flash i got working as its something i created in macromedia flash with.

    sorry for the confusion
     
    fazsnatch, Jan 15, 2009 IP
  11. gnp

    gnp Peon

    Messages:
    137
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Try using this
    
    <object data="bleach.avi" type="application/x-mplayer2" width="500" height="200"><param name="movie" value="bleach.avi" /></object>
    
    HTML:
    although i am not sure if Macs can understand it ... (i think the do..)
     
    gnp, Jan 15, 2009 IP
  12. fazsnatch

    fazsnatch Member

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #12
    nice one mate

    its working nearly perfect just getting it working perfectly in firefox, for some reason in internet explorer it shows up but the play button when pressing it dont work and nothing plays which is weird.
     
    fazsnatch, Jan 15, 2009 IP
  13. gnp

    gnp Peon

    Messages:
    137
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Seems we stumbled upon one of those things...

    FF uses one way while IE uses another and they cannot be combined in a single element..

    .. took me some time to resolve this ..

    now at my system the following works, and i hope it will for all..

    
    <!--[if IE]>
    	<!-- this will appear if the browser is IE -->
    	<object width="500" height="200" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" data="dw.avi">
    		<param name="url" value="dw.avi" />
    	</object>
    <![endif]-->
    <!-- this is the code for the non-IE browsers -->
    <!-- however if this is IE to avoid showing the player twice we make it invisible by including it in an invisible div -->
    <!--[if IE]><div style="display:none"><![endif]-->
    	<object type="application/x-mplayer2" width="500" height="200" data="dw.avi">
    		<param name="url" value="dw.avi" />
    	</object>
    <!--[if IE]></div><![endif]-->
    
    HTML:
     
    gnp, Jan 15, 2009 IP
  14. fazsnatch

    fazsnatch Member

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #14
    that is fantastic mate, got it working now and is functioning perfectly. Really appreciate the help mate
     
    fazsnatch, Jan 15, 2009 IP