# Problem with swffit

**URL:** <https://forum.kirupa.com/t/problem-with-swffit/273333>\
**Category:** flash\
**Created:** [October 14, 2008, 3:32pm UTC](https://forum.kirupa.com/t/problem-with-swffit/273333 "2008-10-14T15:32:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cocoj](https://avatars.discourse-cdn.com/v4/letter/c/6a8cbe/32.png) [@cocoj](https://forum.kirupa.com/u/cocoj)\
**Post date:** [October 14, 2008, 3:32pm UTC](https://forum.kirupa.com/t/problem-with-swffit/273333/1 "2008-10-14T15:32:31Z")

</div>

I have a problem with swffit. I don’t know how to insert the AC\_RunActiveContent in the page.

> \<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “[http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd](http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd)”\>  
> \<html xmlns=“[XHTML namespace](http://www.w3.org/1999/xhtml)” lang=“en” xml:lang=“en”\>  
> \<head\>  
> \<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” /\>  
> \<link rel=“shortcut icon” href=“favicon.ico”\>  
> \<title\>swffit - Example Dynamic - Smart Flash Resize Script\</title\>  
> \<script language=“javascript”\>AC\_FL\_RunContent = 0;\</script\>  
> \<script src=“AC\_RunActiveContent.js” language=“javascript”\>\</script\>  
> \<script type=“text/javascript” src=“swfobject.js”\>\</script\>  
> \<script type=“text/javascript” src=“swffit.js”\>\</script\>  
> \<script type=“text/javascript”\>  
> swfobject.embedSWF(“index.swf”, “my\_flash”, “800”, “700”, “9.0.0”);  
> swffit(“my\_flash”,800,700);  
> \</script\>  
> \<style type=“text/css”\>  
> body{  
> margin-left: 0px;  
> margin-top: 0px;  
> margin-right: 0px;  
> margin-bottom: 0px;  
> background-color: #CCCCCC;  
> }  
> \</style\>  
> \</head\>  
> \<body\>

```
    &lt;div id="my_flash"&gt;
		&lt;a href="http://www.adobe.com/go/getflashplayer"&gt;&lt;img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" title="Get Adobe Flash player" /&gt;&lt;/a&gt;&lt;br /&gt;
		You need &lt;a href="http://www.adobe.com/go/getflashplayer"&gt;Flash Player 8&lt;/a&gt; and allow javascript to see the content of this site..
	&lt;/div&gt;
&lt;/body&gt;

```

\</html\>

This is the html code for it and i don’d know how to make it work with the RunActiveContent so that i don’t need to click the flash befor using it.

Here is the normal html with RunActiveContent that’s working:

> \<html xmlns=“[XHTML namespace](http://www.w3.org/1999/xhtml)” xml:lang=“en” lang=“en”\>  
> \<head\>  
> \<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” /\>  
> \<title\>index\</title\>  
> \<script language=“javascript”\>AC\_FL\_RunContent = 0;\</script\>  
> \<script src=“AC\_RunActiveContent.js” language=“javascript”\>\</script\>  
> \<style type=“text/css”\>  
> \<!–  
> body {  
> margin-left: 0px;  
> margin-top: 0px;  
> margin-right: 0px;  
> margin-bottom: 0px;  
> background-color: #CCCCCC;  
> }  
> –\>  
> \</style\>\</head\>  
> \<body\>  
> \<!–url’s used in the movie–\>  
> \<!–text used in the movie–\>  
> \<!–  
> 58  
> –\>  
> \<!-- saved from url=(0013)about:internet –\>  
> \<script language=“javascript”\>  
> if (AC\_FL\_RunContent == 0) {  
> alert(“This page requires AC\_RunActiveContent.js. In Flash, run "Apply Active Content Update" in the Commands menu to copy AC\_RunActiveContent.js to the HTML output folder.”);  
> } else {  
> AC\_FL\_RunContent(  
> ‘codebase’, ‘[http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0)’,  
> ‘width’, ‘100%’,  
> ‘height’, ‘100%’,  
> ‘src’, ‘index’,  
> ‘quality’, ‘high’,  
> ‘pluginspage’, ‘[http://www.macromedia.com/go/getflashplayer](http://www.macromedia.com/go/getflashplayer)’,  
> ‘align’, ‘middle’,  
> ‘play’, ‘true’,  
> ‘loop’, ‘true’,  
> ‘scale’, ‘showall’,  
> ‘wmode’, ‘window’,  
> ‘devicefont’, ‘false’,  
> ‘id’, ‘index’,  
> ‘bgcolor’, ‘#ffffff’,  
> ‘name’, ‘index’,  
> ‘menu’, ‘false’,  
> ‘allowScriptAccess’,‘sameDomain’,  
> ‘movie’, ‘index’,  
> ‘salign’, ‘’  
> ); //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=8,0,0,0](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0)” width=“100%” height=“100%” id=“index” align=“middle”\>  
> \<param name=“allowScriptAccess” value=“sameDomain” /\>  
> \<param name=“movie” value=“index.swf” /\>\<param name=“menu” value=“false” /\>\<param name=“quality” value=“high” /\>\<param name=“bgcolor” value=“#fffff” /\> \<embed src=“index.swf” menu=“false” quality=“high” bgcolor=“#fffff” width=“100%” height=“100%” name=“index” align=“middle” allowScriptAccess=“sameDomain” type=“application/x-shockwave-flash” pluginspage=“[http://www.macromedia.com/go/getflashplayer](http://www.macromedia.com/go/getflashplayer)” /\>  
> \</object\>  
> \</noscript\>  
> \</body\>  
> \</html\>

Pls someone tell me how to make the page with swffit and RunActiveConten working.  
10x
