對聯(lián)廣告js flash激活
更新時(shí)間:2006年10月19日 00:00:00 作者:
ad.js
復(fù)制代碼 代碼如下:
var delta=0.08
var collection;
function floaters() {
this.items = [];
this.addItem = function(id,x,y,content)
{
document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute; width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</DIV>');
var newItem = {};
newItem.object = document.getElementById(id);
newItem.x = x;
newItem.y = y;
this.items[this.items.length] = newItem;
}
this.play = function()
{
collection = this.items
setInterval('play()',10);
}
}
function play()
{
for(var i=0;i<collection.length;i++)
{
var followObj = collection[i].object;
var followObj_x = (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
var followObj_y = (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);
if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {
var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
followObj.style.left=followObj.offsetLeft+dx;
}
if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {
var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
followObj.style.top=followObj.offsetTop+dy;
}
followObj.style.display = '';
}
}
var theFloaters = new floaters();
//右面
theFloaters.addItem('followDiv1','document.body.clientWidth-106',80,'<EMBED src=images/duilian.swf quality=high WIDTH=100 HEIGHT=300 TYPE=application/x-shockwave-flash id=ad wmode=opaque></EMBED>');
//左面
theFloaters.addItem('followDiv2',6,80,'<EMBED src=images/duilian.swf quality=high WIDTH=100 HEIGHT=300 TYPE=application/x-shockwave-flash id=ad wmode=opaque></EMBED>');
theFloaters.play();
//圖片格式調(diào)用方法
//<a href=http://www.makewing.com/lanren/ target=_blank><img src=images/ad_100x300.jpg border=0></a>
您可能感興趣的文章:
- 用javascript實(shí)現(xiàn)的仿Flash廣告圖片輪換效果
- 基于javascript實(shí)現(xiàn)全屏漂浮廣告
- JavaScript仿商城實(shí)現(xiàn)圖片廣告輪播實(shí)例代碼
- JS實(shí)現(xiàn)可關(guān)閉的對聯(lián)廣告效果代碼
- JavaScript實(shí)現(xiàn)的多個(gè)圖片廣告交替顯示效果代碼
- js實(shí)現(xiàn)網(wǎng)站最上邊可關(guān)閉的浮動廣告條代碼
- js實(shí)現(xiàn)拉幕效果的廣告代碼
- JS實(shí)現(xiàn)彈性漂浮效果的廣告代碼
- js漂浮廣告實(shí)現(xiàn)代碼
- flash+jQuery實(shí)現(xiàn)可關(guān)閉及重復(fù)播放的壓頂廣告
- 基于jQuery的仿flash的廣告輪播
- js+flash實(shí)現(xiàn)的5圖變換效果廣告代碼(附演示與demo源碼下載)
相關(guān)文章
標(biāo)準(zhǔn)布局應(yīng)用:對聯(lián)與旗幟
標(biāo)準(zhǔn)布局應(yīng)用:對聯(lián)與旗幟...2006-12-12js實(shí)現(xiàn)全屏漂浮廣告移入光標(biāo)停止移動
這篇文章主要介紹了js全屏漂浮廣告移入光標(biāo)停止移動效果,大家參考使用吧2013-12-12基于innerHTML中的script廣告實(shí)現(xiàn)代碼[廣告全部放在一個(gè)js里面]
基于innerHTML中的script廣告實(shí)現(xiàn)代碼 ,主要是為了統(tǒng)一管理廣告,但因?yàn)閕nnerHtml的script的一些問題不建議script的代碼下面是一些測試。2009-09-09突破winxp sp2/win2003 sp2超強(qiáng)彈窗代碼
超強(qiáng)彈出代碼,廣告聯(lián)盟專用的代碼2008-09-09用js實(shí)現(xiàn)的一個(gè)Flash滾動輪換顯示圖片代碼生成器
用js實(shí)現(xiàn)的一個(gè)Flash滾動輪換顯示圖片代碼生成器...2007-03-03