Or you can just require the major version, such as "6". This can be a string in the format of ‘’. version – The required player version for your Flash content.height – The height of your Flash movie.The embed tag will also have this value set as it’s name attribute for files that take advantage of swliveconnect. id – The ID of your object or embed tag.swf – The file path and name to your swf file.var so = new SWFObject(swf, id, width, height, version, background-color ) Ĭreate a new SWFObject and pass in the required arguments: This feature has the added bonus of letting search engines index your alternate content. The content placed in the ‘holder’ element will be replaced by the Flash content, so users with the Flash plug-in installed will never see the content inside this element. Prepare an HTML element that will hold our Flash movie. Here is a breakdown of what the code does: Here is an example showing the minimum amount of code needed to embed a Flash movie: This text is replaced by the Flash movie. Simply include the swfobject.js Javascript file, then use a small amount of Javascript on your page to embed your Flash movie. * Pages sent as text/html, not application/xhtml+xml.įor a full list of changes, please see my SWFObject 1.5 blog post. It is also very search engine friendly, degrades gracefully, can be used in valid HTML and XHTML 1.0 documents*, and is forward compatible, so it should work for years to come. The script can detect the Flash plug-in in all major web browsers (on Mac and PC) and is designed to make embedding Flash movies as easy as possible. SWFObject is a small Javascript file used for embedding Adobe Flash content. If you are curious what Geoff is up to these days, you can follow him on Twitter. Please consider the information found here obsolete. Please read: SWFObject 2.0 has been released and is now hosted on github:Â.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |