<html>
<head>
<title>Flash Resize</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function newSize(datoX,datoY) {
if(document.all && !document.getElementById) {
document.all[’miFlash’].style.pixelWidth = datoX;
document.all[’miFlash’].style.pixelHeight = datoY;
}else{
document.getElementById(’miFlash’).style.width = datoX;
document.getElementById(’miFlash’).style.height = datoY;
}
}
//-->
</script>
<style type="text/css">
<!--
td {
font-family: Arial, Helvetica, sans-serif;
}
-->
</style>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0" leftmargin="0" rightmargin="0" onLoad="javascript :newSize(980,50);">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr bgcolor="#eeeeee">
<td>This is HTML</td>
</tr>
<tr>
<td> <div id="miFlash" style="position:relative; width:980px; height:50px; z-index:1 ;" >
<table height="100%" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="100%" id="flashResize" align="middle" onMouseOver="javascript :newSize(980,290);">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="01.swf" />
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="salign" value="lt" />
<param name="bgcolor" value="#ffffff" />
<embed src="flashResize.swf" loop="false" menu="false" quality="high" scale="noscale" salign="lt" bgcolor="#ffffff" width="100%" height="100%" name="flashResize" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object> </td>
</tr>
</table>
</div> </td>
</tr>
<tr bgcolor="#eeeeee">
<td>This is HTML</td>
</tr>
</table>
</body></html>
JS控制flash的高度,但FLASH本身的宽度不会因此而变化(用于鼠标放上去变大的flash效果)
最新推荐文章于 2024-08-04 16:33:59 发布