PDA

View Full Version : Load flash on top of an iframe


Zarela
02-15-2009, 02:20 PM
I'm having loading my flash file on top of my iframe. My flash is transparent.
Here is the code i'm using at the moment. The iframe is loading on top of my flash file.
<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', '1000',
'height', '900',
'src', 'HeatMap flash',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'transparent',
'devicefont', 'false',
'id', 'HeatMap flash',
'bgcolor', '#ffffff',
'name', 'HeatMap flash',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'HeatMap flash',
'salign', ''
); //end AC code
}
</script>
<div id="frame" style="position:absolute; left:0; top:120px; text-align:center; width:100%;">
<iframe src="http://qianzhiwu.com/project-demo" id="webPageFrame" frameborder="0" scrolling="no" style="width:100%; height:800px;" ></iframe>
</div>
<div id="flash" style="position:absolute; left:0; top:120px;">
<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="1000" height="900" id="HeatMap flash" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="HeatMap flash.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /> <embed src="HeatMap flash.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="1000" height="900" name="HeatMap flash" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
</div>

I've tried loading the iframe first then flash and the flash then iframe, still the same result.

Thanks in advance.

Darcey
02-15-2009, 11:13 PM
You will get different results for this using IE,FireFox and Chrome etc.

I've been meaning to try AJAX overlay methods as I just avoid the use of iFrame's at all costs usually.

Should be fine to z-index a div tag, javascript load some content into the lower and flash ontop.

Hope that helps.

Zarela
02-17-2009, 07:59 PM
It works now, thanks for the reply.

thedark_master
03-01-2009, 04:36 PM
Hey can you please tell me how you got it to work? I want the iFrame to show up when a button inside flash is pressed. Please help.