25十二/06
动态调整flash在网页中的显示大小
看到论坛上有人问,碰巧 Conjee_Album 用到了:
//js in html
<script language="JavaScript">
function resizeSwf(w, h){
var swf = thisMovie("yourSwfName");
swf.width = w;
swf.height = h;
}
function thisMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];
} else {
return document[movieName];
}
}
</script>
<script language="JavaScript">
function resizeSwf(w, h){
var swf = thisMovie("yourSwfName");
swf.width = w;
swf.height = h;
}
function thisMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];
} else {
return document[movieName];
}
}
</script>
//as in flash:
ExternalInterface.call("resizeSwf", yourWidth, yourHeight);
ExternalInterface.call("resizeSwf", yourWidth, yourHeight);
注意根据需要指定html里 object 标签的 id 和 embed 标签的 name 为 yourSwfName 。



Pingback: Great Clips Printable Coupon