Oday, I implemented the DUI Lian ad banner in two ways according to two articals found in Internet
* ** Method 1 ***
Reference: website couplet-style flash AdvertisementSource codeHttp://ilovinit.idc99.cn/blogview.asp? Logid = 116
The artical gives detailed info about how to implement a DUI Lian ad banner. So, it is easy to make one by user
Itself. However, there is no chance for users to change the close icon on the banner and the corresponding
Hyperlink, since they are hard coded in the process of producing the SWF (Shockwave Flash) files.
* ** Method 2 ***
Reference: couplet advertisement with the close buttonCodeHttp://www.lulu163.com/111/2005-7-207921.html
As compared, the implementation in method 2 allows users to change easily the close icon and corresponding hyperlink
Note: <SCRIPT src = AD. js> </SCRIPT> must be placed between </body> and Before
Save the following text as a JS file, such as Ad. js. Then replace the SWF address in the code.
<! -- Start the couplet code lulu163.com -->
VaR Delta = 0.015;
VaR collection;
VaR closeb = false;
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 () ', 1 );
}
}
Function play ()
{
If (screen. Width <= 800 | closeb)
{
For (VAR I = 0; I <collection. length; I ++)
{
Collection [I]. Object. style. Display = 'none ';
}
Return;
}
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;
}< br> followobj. style. display = '';
}< BR >}< br> function closebanner ()
{< br> closeb = true;
return;
}
var thefloaters = new floaters ();
//
thefloaters. additem ('followdiv1 ', 'document. body. clientWidth-105 ', 110,'
');
thefloaters. A Dditem ('followdiv2', 5,110, '
');
thefloaters. play ();
ADS/close.gif is the close button, Lu/402.swf, lu/403.swf is the flash Address, and href = job. asp is the flash link address. If you still do not understand, add the QQ group: 2408014
This site is original. Please indicate the source for reprinting!
Http://www.panpan.org/newtexiao/
Click the picture to show hidden connections or content three times to open a new batch of special effects added by the specified connection. The new batch of new special effects are always floating on both sides of the form.
Background: Rain, water drops, drops, special effects. One of the effect effects of transparent flash, one of the effects of transparent flash, is the swimming goldfish on the background, the flying butterfly on the picture.
Transparent flash effect 3 transparent flash effect 4 Transparent flash effect 5 transparent flash effect 6 transparent flash effect 7 transparent flash effect 8
Transparent flash special effects 9 transparent flash Special Effects 10 transparent flash special effects 11 transparent flash Special Effects 12 transparent flash special effects 13 permanent Floating forms on one side
Happy Christmas (flash)
Light shower hut (flash)
Click the mouse to see the flowers
Couplet advertisement code
Code Effect 2 of couplets on both sides [Mouse sensing]
Good couplet advertisement code
Couplet advertisement (with closed)
Couplet advertisement 3 (can be closed) on the background of Ivy League and leaf
Small font size and simplified Conversion
Http://www.blueidea.com/bbs/NewsDetail.asp? Id = 2130183
You have images on both sides. What the landlord wants is flash and images. Can you see this?
VaR Delta = 0.15.
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 ()
{
If (screen. width <= 800)
{
For (VAR I = 0; I <collection. length; I ++)
{
Collection [I]. Object. style. Display = 'none ';
}
Return;
}
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;
}< br> followobj. style. display = '';
}< BR >}< br>
var thefloaters = new floaters ();
thefloaters. additem ('followdiv1 ', 'document. body. clientWidth-106, 102, '> ');
thefloaters. additem ('followdiv2', 6,102, ' ');
thefloaters. Play ();