PDA

View Full Version : Minimum Tag and RunActiveContent


BrightSource
12-18-2008, 01:49 AM
I hope this classifies as a flash 9 general question.

I recently developed a video player for a client that now requires an embed link feature. When I dynamically generate the page it includes the AC_RunActiveContent.js and the huge amount of stuff that goes along with it. Esentially the object tag with all parms and the embed nested in it with the parms duplicated but with the if (AC_FL_RunContent) check

When I look at other embed link scripts from video sites it is very minimal. My understanding of the AC_RunActiveContent script is that it checks versions and installation to ensure the user has the player etc...

Is it silly to include this script when places like youtube and other vid sites do not? Should I try to minimize the script to copy the way they do things? Obviously I can't require the adobe RunActiveContent script if there is an embed link so I am confused.

Here is an example of the script I generate:

<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '429',
'height', '342',
'src', 'VidPlayer',
'quality', 'best',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'VidPlayer',
'bgcolor', '#000000',
'name', 'VidPlayer',
'menu', 'true',
'allowFullScreen', 'true',
'allowScriptAccess','sameDomain',
'movie', '/VidPlayer?FLVURL=http://somewhere.com/220.flv&PreviewClipURL=http://somewhere.com/Uploads/218.jpg',
'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=9,0,0,0" width="429" height="342" id="VidPlayer" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="/VidPlayer.swf?FLVURL=http://somewhere.com/220.flv&PreviewClipURL=http://somewhere.com/Uploads/218.jpg" /><param name="quality" value="best" /><param name="bgcolor" value="#000000" /> <embed src="VidPlayer.swf" quality="best" bgcolor="#000000" width="429" height="342" name="VidPlayer" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>