Skip to the content

(B) Captions

Inserting Flash into a webpage

There are two ways to insert a flash file into a webpage. The first method is via JavaScript, The second method is via the object tag and brower hacks, a bit more accessible friendly but users have to click on flash in order to acativate.

To insert via Javascript

Because if the Eolas Patent lawsuit, Macromedia has created this workaround for inserting flash objects without first activating. The script also requires two additional files. Only Flash CS3 can generate this type of coding.

<script src="[path]/AC_ActiveX.js" type="text/javascript"></script>
<script src="[path]/AC_RunActiveContent.js" type="text/javascript"></script>

The coding is quite tricky, specially if the flash files are located in another directory.

Located inside the HEAD:
<script language="javascript" type="text/javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
'codebase', ',0,0,0',
'width', '534',
'height', '220',
'src', 'banner',
'quality', 'high',
'pluginspage', '',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'opaque',
'devicefont', 'false',
'id', 'banner',
'bgcolor', '#ffffff',
'name', 'banner',
'menu', 'true',
'allowFullScreen', 'false',
'movie', '[path]/banner',
'salign', ''
); //end AC code
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=",0,0,0" width="534" height="220" id="banner" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="[path]banner.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />

To insert using OBJECT

This method is a bit more user friedly. Edit the text in bold/red to match your flash file.

Located inside the BODY:
<!--[if !IE]> -->
<object type="application/x-shockwave-flash"
data="movie.swf" width="300" height="135">
<!-- <![endif]-->

<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="300" height="135">
<param name="movie" value="movie.swf" />
<param name="loop" value="true" />
<param name="menu" value="false" />

<p>This is alternative content.</p>
<!-- <![endif]-->

Play this sample Windows Media file: news640.asx

5151 State University Drive . Los Angeles . CA 90032 . (323) 343-3000
2014 Trustees of the California State University

Last Update: 12/5/2007