<div style="width:1000px">
<div style="width:800px;height:800;float:left;border:1px solid #000;">
<embed src="1.swf" width= "800px" height= "750px" wmode="transparent" type="application/x-shockwave-flash">
</embed>
</div>
<div style="width:80px;float:left">
<a href="#" onclick="change(this)">1.swf</a>
<a href="#" onclick="change(this)">2.swf</a>
<a href="#" onclick="change(this)">3.swf</a>
<a href="#" onclick="change(this)">4.swf</a>
</div>
</div>
<script>
function change(_this){
var oldElement=document.getElementsByTagName("embed")[0];
var p = oldElement.parentNode;
var newElement = document.createElement("embed");
with(newElement){
src= _this.innerHTML;
width= "800px" ;
height= "750px";
wmode= "transparent " ;
type= "application/x-shockwave-flash ";
}
//p.removeChild(oldElement);
p.replaceChild(newElement,oldElement);
}
</script>
</body></html>
把.swf文件順次命名好,
在上面html代碼中這裏添加
<a href="#" onclick="change(this)">1.swf</a>
<a href="#" onclick="change(this)">2.swf</a>
<a href="#" onclick="change(this)">3.swf</a>
<a href="#" onclick="change(this)">4.swf</a>
...
<a href="#" onclick="change(this)">依次命名的.swf文件名</a>
用ie中打開就OK了.