중

뇌입어에서 뽀려온 스크롤

'); } 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개

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

프로그램

8,188건
+
제목 글쓴이 날짜 조회
06-02-19 조회 3,169
06-02-02 조회 5,512
06-01-27 조회 3,768
06-01-27 조회 3,556
06-01-26 조회 4,004
06-01-20 조회 4,145
06-01-19 조회 4,186
06-01-15 조회 3,715
06-01-13 조회 4,086
06-01-10 조회 3,679
06-01-10 조회 3,249
06-01-09 조회 3,866
06-01-05 조회 3,533
06-01-05 조회 3,614
06-01-05 조회 4,896
06-01-04 조회 4,355
06-01-04 조회 6,107
05-12-30 조회 3,456
05-12-30 조회 5,610
05-12-30 조회 4,231
05-12-29 조회 3,982
05-12-27 조회 4,835
05-12-23 조회 3,743
05-12-21 조회 4,924
05-12-21 조회 5,159
05-12-16 조회 4,598
05-12-09 조회 4,623
05-12-05 조회 5,222
05-12-01 조회 3,456
05-11-30 조회 6,215
05-11-30 조회 4,766
05-11-29 조회 3,678
05-11-26 조회 3,348
05-11-10 조회 3,794
05-11-09 조회 4,117
05-11-09 조회 3,899
bbbking
05-11-05 조회 6,870
05-10-23 조회 3,773
bbbking
05-10-22 조회 5,401
05-10-20 조회 3,226
05-10-13 조회 8,420
05-10-09 조회 3,521
05-09-29 조회 4,566
05-09-28 조회 5,393
05-09-27 조회 3,664
05-09-27 조회 4,944
05-09-24 조회 4,170
05-09-23 조회 5,177
05-09-22 조회 6,176
05-09-22 조회 5,262
05-09-21 조회 6,922
05-09-15 조회 3,132
05-09-11 조회 4,325
05-09-08 조회 4,576
05-09-08 조회 3,980
05-09-08 조회 3,471
05-09-05 조회 5,690
05-09-04 조회 3,280
05-09-02 조회 3,246
05-09-02 조회 2,900
05-09-02 조회 2,691
05-09-01 조회 4,767
05-09-01 조회 5,895
05-08-31 조회 3,509
05-08-31 조회 4,187
05-08-25 조회 6,879
05-08-25 조회 3,899
05-08-21 조회 3,344
05-08-19 조회 5,599
05-08-18 조회 3,698
05-08-18 조회 3,292
05-08-17 조회 3,800
05-08-16 조회 3,666
05-08-14 조회 3,923
05-08-14 조회 4,404
05-08-08 조회 3,697
05-08-07 조회 5,777
05-08-05 조회 4,259
05-08-04 조회 5,600
05-08-01 조회 4,045
05-07-29 조회 5,163
05-07-29 조회 5,399
05-07-28 조회 8,071
05-07-27 조회 4,849
05-07-25 조회 3,776
05-07-24 조회 5,417
05-07-24 조회 3,238
05-07-22 조회 5,296
05-07-21 조회 4,768
05-07-21 조회 3,589
05-07-19 조회 5,867
bbbking
05-07-19 조회 3,517
05-07-16 조회 5,529
05-07-15 조회 4,626
05-07-14 조회 4,673
05-07-13 조회 4,834
05-07-12 조회 4,225
05-07-12 조회 6,963
05-07-11 조회 3,969
05-07-08 조회 6,838