www.webdeveloper.com
Results 1 to 3 of 3

Thread: Script for placing SWF flash video on html page

  1. #1
    Join Date
    May 2008
    Posts
    16

    Script for placing SWF flash video on html page

    Hi,
    Here is a typical example of script for micromedia flash object:

    Code:
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="600" height="420" id="alternator1">
    <param name="allowScriptAccess" value="sameDomain">
    <param name="movie" value="alternator1.swf">
    <embed src="alternator1.swf" quality="high" bgcolor="#ffffff" width="600" height="420" name="alternator1" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" >
    </object>
    I was experimenting with the script and found that it works fine without the last "embed src=..." tag and without codebase= in the object tage.
    I wonder, what the purpose of "embed src=..." tag and codebase parameter?

  2. #2
    Join Date
    Sep 2006
    Location
    new york
    Posts
    267
    Back in the days of "browser wars" between Netscape and Internet Explorer, you included both (the <embed> nested with the <object>tag</object>).

    A more up-to-date explanation might be found here: http://stackoverflow.com/questions/2...nd-object-tags
    <embed> is invalid in XHTML 1.0 and HTML 4, but it’s valid in HTML5, so you could switch to the HTML5 doctype and be compliant with that standard instead.

    As mentioned above, the Flash Satay article at A List Apart is a great explanation of how to get Flash working with just an <object> tag. It’s not so much which browsers support <object> (I think only Netscape 4 doesn’t), it’s more that the differences in how the browsers support Flash embedded with <object> screw everything up.

    Definitely read the article. It’s got code you can use and everything. In short, <object> on its own works fine, unless you want a Flash movie to start playing before it’s fully downloaded. Then you need another Flash movie to act as a wrapper.
    P.S. -- It has not been Macromedia for several years now since Adobe bought Flash.
    Last edited by auntnini; 03-19-2014 at 07:21 PM. Reason: add P.S.

  3. #3
    Join Date
    Mar 2014
    Posts
    40
    I advice to use SWFObject

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles