Hi guys,
I've got an easy question. I've finished my flash file. I created it with Flash CS3. I didn't use any scripting, dynamic stuff, etc.. It's a simple flash movie of vectors/tweening.
I want to insert it in my homepage, but when I publish it, I get quite a lot of code. I've been looking around & I see some sites that have all this javascript & some that don't.
Could someone help me identify the correct way to embed my .swf file? I'm not a fan of .js since it doesn't work if it's turned off in a user's browser. I want my .swf file to play as long as the visitor has Flash 8 or higher installed. And if they don't, I want to display a .png instead.
Under publish settings/Flash I set:
Version: 8
(the rest I left at default)
Under publish settings/HTML I set:
Template: Flash only
Detect Flash Version: I checked. Should I uncheck it?
Window mode: Transparent windowless (I want a transparent bg)
And I have a PNG tab...
I've noticed the code it generates includes some .js & other stuff
Code:
<script language="javascript"> AC_FL_RunContent = 0; </script>
<script language="javascript"> DetectFlashVer = 0; </script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 8;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 24;
// -----------------------------------------------------------------------------
// -->
</script>
Then has some if statements
Code:
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
alert("This page requires AC_RunActiveContent.js.");
This will only alert if this .js isn't on my server, right? Visitors don't need it?
Code:
} else {
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion) { // if we've detected an acceptable version
// embed the flash movie
AC_FL_RunContent(
....
Is this the code that's ran if they don't have flash, or have a really old version:
Code:
} else { // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be placed here.'
+ 'This content requires the Adobe Flash Player.'
+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
document.write(alternateContent); // insert non-flash content
}
Am I supposed to manually put an alternate image here?
Then why is this here:
Code:
<noscript>
// Provide alternate content for browsers that do not support scripting
// or for those that have scripting disabled.
Alternate HTML content should be placed here. This content requires the Adobe Flash Player.
<a href="http://www.macromedia.com/go/getflash/">Get Flash</a>
</noscript>
It sounds like the .swf won't play if .js is disabled, & that's what this code's for?
Is all this necessary?
Thanks for your help,
-David