Previously We used to embed flash files in web pages via simple embed method which pops up flash settings alert or Flash Settings Manager. Following way is to embed Flash movie (swf file) in web page using Javascript which will play for all browsers and will not alert you for flash settings.

Old Way Of Embeding SWF In Web Pages
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="200" height="100">
<param name="movie" value="mymovie.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<embed src="mymovie.swf" width="200" height="100" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false"></embed>
</object>

We had to go to Flash Global Settings Manager to set settings to stop that pop up window.

New Adobe Dreamweaver CS3 provides a way to embed flash files in web pages via javascript by using AC_RunActiveContent.js file.

Suppose I have swf movie named as mymovie.swf. I will embed it in web page by using following method. You will need AC_RunActiveContent.js file which Adobe Dreamweaver provides while you embed swf in web pages.

For Head Section Of Page
<script src="AC_RunActiveContent.js" type="text/javascript"></script>
Embeding SWF Via Javascript
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','200','height','100','src','mymovie','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','mymovie' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="200" height="100">
  <param name="movie" value="mymovie.swf">
  <param name="quality" value="high">
  <embed src="mymovie.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="200" height="100"></embed>
</object></noscript>

* For above example, you will have to change the movie name at four places. Two times it appears as mymovie.swf and two times as mymovie in code above and movie’s height and width three times too.

Download Full Script

Related Posts

, , , ,

Leave a Review

Incoming Searches

javascript embed swf, embed swf javascript, how to embed swf in javascript, embed swf js, embed swf in js, javascript swf, javascript swf embed, javascript show swf file, javascript run active content, javascript random embed, javascript play multiple swf files, javascript include swf, insert swf to javascript, javascript execute swf file, how to insert swf file in javascript, how to know swf file run successfully in javascript, how to play js embedded swf movie, how to play swf javascript, how to: embed javascript to swf, swf embed with runactive js, javascript calling multiple swf, javascript embed code swf, embedding swf using javascript in flash, javascript embed swf movie, javascript to call swf file in dreamweaver, javascript to embed an swf, run active content javascript, run active content scrollbar code, run javascript when swf file ends?, script for embedding flash files, script pentru swf cu css, swf embedding java script code, swf in js, swf in qooxdoo, to call script embeded in swf file using javascript, using JavaScript to display SWF files, run active content for flash, require run active js, javascript to embed swf, javascript to run a swf file, js add swf, js embed swf, js Play multiple swf files in sequence, js swf embed, multiple swf embedSWF, need script for play swf files in web, pop up swf files javascripts, preloader embed swf file js, web flash embed, ac run active content, add swf file through javascript, add swf javascript, call multiple swf files xml script, change embed src using javascript, creating active content scripts, ebmed flash via javascript, embed a flash object in Ext js, embed flash in javascript, embed flash in javascript popup, add flash file to html and active scrollbar in browser, ac_runactivecontent js adobe, ac run active content downloads, ac run active content js, ac run active content on firefox, ac run active content pour flash, ac run active content?, AC run content for swf, ac run javascript flash, ac runactivecontent js, active ac run active content google chrome, embed flash object with extjs, embed swf 100%, embed swf file with javascript, embedSWF opacity, executing js file from swf, extjs AC_FL_RunContent, flash ac run active js, how to add a swf file in javascript, how to control swf width in javascript, how to embed flash file in javascript, how to embed swf file dynamically using javascript, how to embed swf file in javascript, embedSWF 100%, embedding swfs using javascript, embed swf files using javascript, embed swf in css, embed swf in javascript, embed swf on js, embed swf popup, embed swf using javascript, embed swf with javascript, embedding flash object in extjs, embedding swf in php javascript, how to embed swf in java script