swfobject.js - Nice Way to embed and detect flash player

Get all answers regarding ActionScript 2.0

swfobject.js - Nice Way to embed and detect flash player

Postby Ashish on Tue Feb 01, 2011 12:56 pm

Simply include the swfobject.js Javascript file,
then put a small Javascript code on your page to embed your Flash movie.

Here is an example showing the minimum amount of code needed to embed a Flash movie:

Code: Select all
<script type="text/javascript" src="swfobject.js"></script>

<div id="flashcontent">
  This text is replaced by the Flash movie.
</div>

<script type="text/javascript">
   var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
   so.write("flashcontent");
</script>


<div id="flashcontent">[your flash content/player will appear here.]</div>



here is the parameters information to pass your flash details in JS code to show/load on that on page.
var so = new SWFObject(swf, id, width, height, version, background-color [, quality, xiRedirectUrl, redirectUrl, detectKey]);

You can use this to make fullscreen or screen resolution adaptive websites in Flash.

Click Here to Download SWFOBJECT.JS

Bookmark and Share
Attachments
swfobject.zip
Loging and download the attached swfobject.js sample code.
(62.75 KiB) Downloaded 157 times
Ashish
 
Posts: 153
Joined: Tue Oct 14, 2008 1:49 pm

Return to ActionScript 2.0

Who is online

Users browsing this forum: No registered users and 1 guest

cron