Magic
Moderator
Sr. Member
    
Online
Posts: 97

|
 |
Inserting Flash into a Webpage
on May 05 2008, 10:13 PM |
|
How to Insert Flash into a Webpage
Option 1:
<object type="application/x-shockwave-flash" data="flashmovie.swf" width="250" height="250"> <param name="movie" value="flashmovie.swf" /> <img src="flashmovie.gif" width="250" height="250" alt="Alternate Flash Content" /> </object>
That's it ! This code can be used in XHTML 1.0 documents and will validate to W3C standards. The code will degrade to the .gif image if the Flash player is not available.
Option 2:
<script type="text/javascript"> <!-- document.write('<object type="application/x-shockwave-flash" data="flashmovie.swf"'); document.write('width="250" height="250">'); document.write('<param name="movie" value="flashmovie.swf"'); document.write('<a href="link.html"><img src="flashmovie.gif" width="250" height="250" border="0" alt="Alternate Content" title="Alternate Content"><\/a>'); document.write('<\/object>'); //--> </script><noscript><a href="linkedpage.html"><img src="flashmovie.gif" width="250" height="250" border="0" alt="Alternate Content" title="Alternate Content"></a></noscript>
Use this second option if you need to check that the user can run javascript in their browser.
I believe that these are the proper methods for inserting Flash movies into web pages.
|