뇌입어에서 뽀려온 스크롤

'); } else if ( this.type == 2 ) { document.write('
'); document.write(this.item[i]); document.write('
'); } } document.write(''); }; this.scroll = function () { this.currentspeed = this.scrollspeed;if ( !this.stop ) { for (i = 0; i < this.itemcount; i++) { obj = document.getElementById(this.name+'item'+i).style;if ( this.type == 1 ) { obj.top = parseInt(obj.top) - 1; if ( parseInt(obj.top) <= this.height*(-1) ) obj.top = this.height * (this.itemcount-1); if ( parseInt(obj.top) == 0 || ( this.stopHeight > 0 && this.stopHeight - parseInt(obj.top) == 0 ) ) this.currentspeed = this.pausedelay; } else if ( this.type == 2 ) { obj.left = parseInt(obj.left) - 1; if ( parseInt(obj.left) <= this.left*(-1) ) obj.left = this.left* (this.itemcount-1); if ( parseInt(obj.left) == 0 ) this.currentspeed = this.pausedelay; } } } window.setTimeout(this.name+".scroll()",this.currentspeed); }; this.onmouseover = function () { if ( this.pausemouseover ) { this.stop = true;} }; this.onmouseout = function () { if ( this.pausemouseover ) { this.stop = false; } }; }

뇌입어의 뉴스에서 뽀려온 스크롤 소스

이것으로 최신글 스킨을 만들면 재미 있을 듯 하네요.

아무도 만들지 않으면 내가 만들어 만점 먹습니다. ^^

미리보기

"); cont.add("
내용3
"); cont.add("
내용2
"); cont.add("
내용1
"); cont.start();

코드

<script> function scroll() { this.name = "scroll"; this.item = new Array(); this.itemcount = 0; this.currentspeed = 0; this.scrollspeed = 50; this.pausedelay = 1000; this.pausemouseover = false; this.stop = false; this.type = 1; this.height = 100; this.width = 100; this.stopHeight=0; this.add =function () { var text = arguments[0]; this.item[this.itemcount] = text; this.itemcount = this.itemcount + 1; }; this.start = function () { this.display(); this.currentspeed = this.scrollspeed; setTimeout(this.name+'.scroll()',this.currentspeed); }; this.display =function () { document.write('<div id="'+this.name+'" style="height:'+this.height+';width:'+this.width+';position:relative;overflow:hidden;" OnMouseOver="'+this.name+'.onmouseover();" OnMouseOut="'+this.name+'.onmouseout();">'); for(var i = 0; i < this.itemcount; i++) {if ( this.type == 1) { document.write('<div id="'+this.name+'item'+i+'"style="left:0px;width:'+this.width+';position:absolute;top:'+(this.height*i+1)+'px;">'); document.write(this.item[i]); document.write('</div>'); } else if ( this.type == 2 ) { document.write('<div id="'+this.name+'item'+i+'"style="left:'+(this.width*i+1)+'px;width:'+this.width+';position:absolute;top:0px;">'); document.write(this.item[i]); document.write('</div>'); } } document.write('</div>'); }; this.scroll = function () { this.currentspeed = this.scrollspeed;if ( !this.stop ) { for (i = 0; i < this.itemcount; i++) { obj = document.getElementById(this.name+'item'+i).style;if ( this.type == 1 ) { obj.top = parseInt(obj.top) - 1; if ( parseInt(obj.top) <= this.height*(-1) ) obj.top = this.height * (this.itemcount-1); if ( parseInt(obj.top) == 0 || ( this.stopHeight > 0 && this.stopHeight - parseInt(obj.top) == 0 ) ) this.currentspeed = this.pausedelay; } else if ( this.type == 2 ) { obj.left = parseInt(obj.left) - 1; if ( parseInt(obj.left) <= this.left*(-1) ) obj.left = this.left* (this.itemcount-1); if ( parseInt(obj.left) == 0 ) this.currentspeed = this.pausedelay; } } } window.setTimeout(this.name+".scroll()",this.currentspeed); }; this.onmouseover = function () { if ( this.pausemouseover ) { this.stop = true;} }; this.onmouseout = function () { if ( this.pausemouseover ) { this.stop = false; } }; } </script> <table width="243" border=0 cellpadding=0 cellspacing=0 bgcolor=#EBE8E2> <tr> <td width="243"> <script> cont = new scroll(); cont.name = "cont"; cont.height = 115; cont.width = 226; cont.scrollspeed = 20; cont.pausedelay = 3000; cont.pausemouseover = true; cont.add("<table width=100%><tr><td height=20 colspan=2>내용4</td></tr></table>"); cont.add("<table width=100%><tr><td height=20 colspan=2>내용3</td></tr></table>"); cont.add("<table width=100%><tr><td height=20 colspan=2>내용2</td></tr></table>"); cont.add("<table width=100%><tr><td height=20 colspan=2>내용1</td></tr></table>"); cont.start(); </script> </td> </tr> </table>

 

[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]
|

댓글 3개

헉스... 내가 몇일만 젊었어도 내가 만들고 만점 먹었을텐데..ㅋ
파폭에서 이상없이 표시 됩니다.
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
20년 전 조회 3,361
20년 전 조회 2,695
20년 전 조회 4,769
20년 전 조회 3,306
20년 전 조회 4,584
20년 전 조회 3,046
20년 전 조회 4,171
20년 전 조회 4,414
20년 전 조회 7,080
20년 전 조회 3,908
20년 전 조회 2,804
20년 전 조회 4,432
20년 전 조회 2,253
20년 전 조회 4,368
20년 전 조회 3,825
20년 전 조회 2,627
20년 전 조회 4,871
bbbking
20년 전 조회 2,575
20년 전 조회 4,534
20년 전 조회 3,595
20년 전 조회 3,614
20년 전 조회 3,855
20년 전 조회 3,245
20년 전 조회 5,958
20년 전 조회 2,971
20년 전 조회 5,880
bbbking
20년 전 조회 2,396
bbbking
20년 전 조회 1,810
bbbking
20년 전 조회 2,173
bbbking
20년 전 조회 3,572
bbbking
20년 전 조회 2,078
bbbking
20년 전 조회 4,438
20년 전 조회 3,400
bbbking
20년 전 조회 2,237
bbbking
20년 전 조회 7,828
20년 전 조회 5,576
20년 전 조회 3,037
20년 전 조회 5,605
20년 전 조회 2,393
20년 전 조회 2,620
20년 전 조회 2,388
20년 전 조회 2,240
20년 전 조회 2,171
20년 전 조회 2,619
20년 전 조회 2,597
20년 전 조회 2,508
20년 전 조회 2,699
20년 전 조회 2,398
20년 전 조회 2,612
20년 전 조회 3,538
bbbking
20년 전 조회 5,387
20년 전 조회 3,751
20년 전 조회 3,207
20년 전 조회 5,952
bbbking
20년 전 조회 5,758
20년 전 조회 4,164
20년 전 조회 2,420
20년 전 조회 3,219
20년 전 조회 1,947
20년 전 조회 1,604
20년 전 조회 3,177
20년 전 조회 3,584
20년 전 조회 5,135
20년 전 조회 5,828
20년 전 조회 3,702
20년 전 조회 5,050
20년 전 조회 3,332
20년 전 조회 3,650
bbbking
20년 전 조회 7,966
bbbking
20년 전 조회 5,934
20년 전 조회 4,504
20년 전 조회 4,056
20년 전 조회 2,800
20년 전 조회 2,737
20년 전 조회 2,382
20년 전 조회 1,671
20년 전 조회 2,292
20년 전 조회 3,695
20년 전 조회 4,159
20년 전 조회 1만
20년 전 조회 5,074
20년 전 조회 3,403
20년 전 조회 3,217
20년 전 조회 3,854
20년 전 조회 2,102
20년 전 조회 3,185
20년 전 조회 3,375
20년 전 조회 2,431
20년 전 조회 5,511
20년 전 조회 2,556
20년 전 조회 2,995
20년 전 조회 4,237
20년 전 조회 2,644
20년 전 조회 2,335
20년 전 조회 3,719
20년 전 조회 2,116
20년 전 조회 3,606
20년 전 조회 2,519
20년 전 조회 2,953
20년 전 조회 2,249