Có lẽ mọi người biết hết rùi nhưng xin post thêm bài này để mọi người thêm hiệu ứng flash vào trong forum mình dễ dàng .
Bạn đưa văn bản này vào file có tên là flash.js
Code:function flash(url,w,h,bg,win,vars){ var s= "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' align='middle'>"+ "<param name='movie' value='"+url+"' />"+ "<param name='wmode' value='"+win+"' />"+ "<param name='quality' value='high' />"+ "<param name='FlashVars' value='"+vars+"' />"+ "<param name='bgcolor' value='"+bg+"' />"+ "<embed src='"+url+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' align='middle' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+ "</object>"; document.write(s); }
Trước tiên thêm file flash.js vào trong forum
chèn vào headinclude
Code:<script language="javascript" src="clientscript/flash.js"></script>
Đoạn này là chèn vào header
Thay đổi tuỳ chọn các thông số nhéCode:<center> <div style="position: relative;"> <div style="position: absolute; top:0px; left:0px; font: 20px Arial; z-index:2"> <script>flash('flash/BuomTrang.swf','1000','250','','transparent','');</script> </div> </div> </center>
top , left
flash('flash/BuomTrang.swf','1000','250','','transparent',''); => width=1000 và hight=250
file flash.js copy vào thư mục clientscript
fodeu flash -> trong này có rất nhiều hiệu ứng flash đẹp bạn copy vào ngang hàng với file index.php để dễ sài
Bookmarks