Jump to content
wolfkin

Is This How You Embed A Flash Object

Recommended Posts

What I know about javascipt you could fix on half a page. I'm still getting competent with CSS. Anyway I'm overhauling a site and looking at this code and other objects I've had to embed it seems to me that this is two ways of doing the same thing. Could I just leave off the javascript at the top and start with the object code and get the same results? or am I missing something/reading it wrong?

<script language="javascript">AC_FL_RunContent = 0;</script><script src="AC_RunActiveContent.js" language="javascript"></script></head><body bgcolor="#0b0f11"><div align="center"><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=8,0,0,0',            'width', '766',            'height', '600',            'src', 'main5_v8-good',            'quality', 'high',            'pluginspage', 'http://www.macromedia.com/go/getflashplayer',            'align', 'middle',            'play', 'true',            'loop', 'true',            'scale', 'showall',            'wmode', 'window',            'devicefont', 'false',            'id', 'main5_v8-good',            'bgcolor', '#0b0f11',            'name', 'main5_v8-good',            'menu', 'true',            'allowFullScreen', 'false',            'allowScriptAccess','sameDomain',            'movie', 'main5_v8-good',            '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" width="766" height="600" id="main5_v8-good" align="middle">            <param name="allowScriptAccess" value="sameDomain" />    <param name="allowFullScreen" value="false" />    <param name="movie" value="main5_v8-good.swf" /><param name="quality" value="high" />    <param name="bgcolor" value="#0b0f11" />        <embed src="main5_v8-good.swf" quality="high" bgcolor="#0b0f11" width="766" height="600" name="main5_v8-good"    align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash"    pluginspage="http://www.macromedia.com/go/getflashplayer" />    </object></noscript></div>

if you're going to copy-paste note that a lot of it was one one line and it was breaking the codebox so I had to break some of it.

Edited by wolfkin

Share this post


Link to post
Share on other sites

All the JavaScript seems to be doing is doing a little error management: if the user's browser doesn't support Flash content, then the user will get a pop-up explaining the lack of Flash content where they are expecting it. If the user doesn't even support JS, then the page tries to load the object without this courtesy via the noscript tags. It's just a nice level of information in the event that the user's browser/preferences don't allow Flash content, which may prompt them to sort the problem or accept that the page isn't displaying as it was intended.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...