Hi there Rain Lover,
here is a rough and ready example for you to play with...
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title>rough example</title>
<style type="text/css">
#flash{
width:800px;
margin:auto;
}
</style>
<script type="text/javascript">
var c,o,p0,p1;
function init(){
c=document.getElementById('colors').value;
document.getElementById('colors').onchange=function(){
document.getElementById('flash').removeChild(o);
c=this.value;
makeIt();
}
makeIt();
}
function makeIt(){
o=document.createElement('object');
o.setAttribute('type','application/x-shockwave-flash');
o.setAttribute('data','http://rain-lover.webs.com/menu.swf');
o.setAttribute('width',800);
o.setAttribute('height',600);
p0=document.createElement('param');
p0.setAttribute('name','movie');
p0.setAttribute('value','http://rain-lover.webs.com/menu.swf');
p1=document.createElement('param');
p1.setAttribute('name','bgcolor');
p1.setAttribute('value',c);
o.appendChild(p0);
o.appendChild(p1);
document.getElementById('flash').appendChild(o);
}
window.addEventListener?
window.addEventListener('load',init,false):
window.attachEvent('onload',init);
</script>
</head>
<body>
<div>
<select id="colors">
<option value="000000">black</option>
<option value="ff0000">red</option>
<option value="0000ff">blue</option>
<option value="00ff00">green</option>
<option value="ff9933">yellow</option>
</select>
</div>
<div id="flash"></div>
</body>
</html>
cothead
Bookmarks