I’m publishing to Flash 8 Player and even though I can load one movie into another within Flash, when I publish the HTML all I can see is the container SWF - the loaded SWF is invisible. I’ve tried this with more than one loader movie and the result is the same. Here’s my HTML for Flash:
<script language="JavaScript" type="text/javascript">
<!--
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion) { // if we've detected an acceptable version
// embed the flash movie
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0',
'width', '960',
'height', '516',
'src', 'quiz_ui',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'transparent',
'devicefont', 'false',
'id', 'quiz_ui',
'bgcolor', '#ffffff',
'name', 'quiz_ui',
'menu', 'true',
'allowScriptAccess','sameDomain',
'allowFullScreen','false',
'movie', 'swf/quiz_ui',
'salign', ''
); //end AC 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
}
}
// -->
</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="960" height="516" id="quiz_ui" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="swf/quiz_ui.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /> <embed src="swf/quiz_ui.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="960" height="516" name="quiz_ui" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
My LoadMovie script:
var contentMC:MovieClip = content_mc;
var displayPercent:MovieClip = loadinfo_mc;
displayPercent._visible = false;
///////////// MovieClipLoader /////////////////////
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(this);
function onLoadInit(contentMC:MovieClip) {
displayPercent._visible = false;
content_mc._lockroot = true; //Doesn't see to make a difference
//Alert.show("LOADED");
}
function onLoadProgress(contentMC:MovieClip, loaded:Number, total:Number) {
contentMC._visible = true;
displayPercent._visible = true;
var percent:Number = Math.floor(loaded / total * 100);
displayPercent.infodisplay_txt.text = "LOADING: " + percent + "%";
}
///////////// File to load immediately /////////////
externalSWF = "page1.swf";
loader.loadClip(externalSWF,contentMC);
Both files are published to Flash 8 Player and set to wmode ‘transparent’. Has anyone else encountered this problem? One other interesting note: if I set up an Alert box to appear on load, it never appears if I run the files within the HTML page, only if I run the container file within the Flash authoring environment (then everything works fine).