Okay I have this dropdown menu. I want the height to be 40 pixels while the menu is up, and around 300 pixels when each menu is down. I found some code via google showing me how to do it, but for some reason I can’t make it happen with my flash. The height will not change when javascript is called from flash. It will change when I call the javascript from the html though.
I am attaching my fla file.
My AS is:
test.onRollOver = function() {
getURL("javascript:newSize(778, 300)");
test2._alpha = 100;
};
test.onRollOut = function() {
getURL("javascript:newSize(778, 40)");
test2._alpha = 0;
};
My HTML/Javascript is:
<HTML>
<HEAD>
<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<TITLE>"resizable Flash movie"</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>
</HEAD>
<BODY leftmargin="0" topmargin="0" marginheight="0" onLoad="javascript:newSize(778,40);">
<div id="miFlash" style="position:relative; z-index:1 background-color: #00FF00;">
<object WIDTH="100%" HEIGHT="100%" id="resizable2" ALIGN="">
<param name="movie" value="test.swf" />
<PARAM NAME=salign VALUE="LT">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=scale VALUE=noscale>
<EMBED src="test.swf" quality=high scale=noscale WIDTH="100%" HEIGHT="100%" NAME="resizable2" SALIGN="LT" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</object>
</div>
</BODY>
</HTML>
PLEASE HELP! This is driving me nuts and I want to move on to another project.