All the examples below use flashobject.js
file to remove the "click to active" message on the web page and
'autumn' template.
No Script
The Flash menu will be published with the javascript that automatically
activating itself. Below is an example of a web page that using this option.
<HEAD>
.........
<script type="text/javascript" src="flashobject.js"></script>
... ... ...
</HEAD>
... ... ...
<BODY ... >
... ... ...
<div id="menu_id">SWFMenu Placeholder.</div>
<script type="text/javascript">
var fo = new FlashObject("menu.swf","color","529","172","6","#FFFFFF");
fo.addParam("menu","false");
fo.addParam("quality","best");
fo.addParam("scale","noscale");
fo.addParam("salign","LT");
fo.addParam("wmode", "transparent");
fo.write("menu_id");
</script>
... ... ...
</BODY>
Centered
In this case, the Flash menu will be centered even the web page is resized.
Simply set integer value to 'Menu Top' and 'Z-index' in the Publish Wizard.
<HEAD>
... ... ...
<script type="text/javascript" src="flashobject.js"></script>
<script type="text/javascript" src="adjustmenu.js"></script>
<script type="text/javascript">
function open_menu()
{
document.getElementById('color').style.height="172px";
}
function close_menu()
{
document.getElementById('color').style.height="24px";
}
</script>
... ... ...
</HEAD>
... ... ...
<BODY onload="AdjustMenu('color','true',0,50)"
onresize="AdjustMenu('color','true',0,50)"
...>
... ... ...
<div id="menu_id">SWFMenu Placeholder.</div>
<script type="text/javascript">
var fo = new FlashObject("1.swf","color","529","172","6","#FFFFFF");
fo.addParam("menu","false");
fo.addParam("quality","best");
fo.addParam("scale","noscale");
fo.addParam("salign","LT");
fo.addParam("wmode", "transparent");
if (navigator.appName.indexOf("Microsoft")== -1) {
fo.addVariable("notIE","1");}
fo.write("menu_id");
document.getElementById('color').style.width="529px";
document.getElementById('color').style.position="absolute";
document.getElementById('color').style.zIndex="10"
</script>
... ... ...
</BODY>
Note:
Please don't forget add AdjustMenu() function in the BODY tag.
Layered
Beside the javascript above, the Flash menu will be published with CSS (Cascading
Style Sheets) codes as well, which defining the absolute position of the
Flash menu. Below is an example of a web page that using this option.
<HEAD>
... ... ...
<script type="text/javascript" src="flashobject.js"></script>
<script type="text/javascript" src="adjustmenu.js"></script>
<script type="text/javascript" >
function open_menu()
{
document.getElementById('color').style.height="172px";
}
function close_menu()
{
document.getElementById('color').style.height="24px";
}
</script>
... ... ...
</HEAD>
... ... ...
<BODY onload="AdjustMenu('color','false',80,100)"
onresize="AdjustMenu('color','false',80,100)">
... ... ...
<div id="menu_id">SWFMenu Placeholder.</div>
<script type="text/javascript">
var fo = new FlashObject("1.swf","color","529","172","6","#FFFFFF");
fo.addParam("menu","false");
fo.addParam("quality","best");
fo.addParam("scale","noscale");
fo.addParam("salign","LT");
fo.addParam("wmode", "transparent");
if (navigator.appName.indexOf("Microsoft")== -1) {
fo.addVariable("notIE","1");}
fo.write("menu_id");
document.getElementById('color').style.width="529px";
document.getElementById('color').style.position="absolute";
document.getElementById('color').style.zIndex="10";
</script>
... ... ...
</BODY>
Note:
Please don't forget to copy the corresponding Javascript files (*.js).
|