<html>
<head>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="kr" xmlns="
http://www.w3.org/1999/xhtml" xml:lang="kr">
<script language="Javascript">
/******************************************************************************
* 만든목적: JS 롤링;
* 만든이:허웅 [comefeel];
* 제작시간:총 7~8시간;
* JS 경력:현재 6개월차 -..-; 초허접;
* last update:2007.01
* igear.co.kr 도와준분 [zeldign] 플머 12년차;
* e-mail : igearmall.co.kr <
comefeel@daum.net>
comefeel@comefeel.com 도 있지만 현재 안됨 ;
* 이것을 사용할려고 할시에 주석을 지우면 사용할수 없음;
* 허접한 소스를 보고 -_-+ 머라고 하면 쫏아감;
* **
*/
var roll_Class=function(){this.initialize.apply(this,arguments);}
roll_Class.prototype={
initialize:function(){
this.className=arguments[0]?arguments[0]:null;
this.foundit(arguments[1],'',false);
this.contents=new Array('0');
this.contents_delay=null;
this.nowdelay=null;
this.foundit(
this.roll.childNodes,this.foundvalue ,
function(rt,that){
if(that.constrain_size !== null) that.foundit(rt.childNodes,'IMG',function(rt,that){rt.style[(this.moving != 'left' ? 'width' : 'height')] = that.constrain_size;});
that.contents_delay=that.contents[that.contents.length]=that.contents_delay+-rt[(that.moving=='left'?'offsetWidth':'offsetHeight')];});
{
this.rollHeight=this.proll.style[(this.moving=='left'?'width':'height')]=Math.abs(this.contents[this.contents.length-1]);
this.roll.appendChild(this.roll.cloneNode(true));
};},
foundit:function(tg,n){
var temp=new Array();
for(var v in tg)
switch(typeof arguments[2]){
case 'object':if(arguments[2].initialize(tg[v],n,this)==true) return; else break;
case 'function':if(tg[v].nodeName==n) arguments[2](tg[v],this); break;
case 'boolean':this[v]=tg[v]; break;
default:if(tg[v].nodeName==n) return tg[v];
}
return temp;},
inaction:function(time){
this.roll.style[this.moving]=time=time < 0 ?(this.fall==false && time <= -this.rollHeight?0:time):-this.rollHeight,null;
this.foundit(this.contents,time,{initialize:function(rt,vrt,that){if(Math.abs(rt - vrt) <(that.fast==false?that.tick:that.ftick)){that.roll.style[that.moving]=rt; that.nowdelay=that.fast==true?that.lengthen:that.delay; that.fast=false; return true;} else that.nowdelay=that.lengthen;}});
{var ticks=this.fast==true?this.ftick:this.tick;}
this.control=setTimeout(this.className+".inaction("+(parseInt(this.roll.style[this.moving])+(this.fall==true?ticks:-ticks))+");",this.nowdelay);},
stop:function(){
this.temp=parseInt(this.roll.style[this.moving]);
clearTimeout(this.control);}};
</script>
<!-- 세로롤링 셈플 -->
<table border="0" cellpadding="0" cellspacing="0" height="140">
<tr>
<td>
<div id="parent_rolltable1" name="parent_rolltable1" style='overflow:hidden;text-overflow:ellipsis;border:1px solid #000000' onmouseover="height_class.stop();" onmouseout="height_class.inaction(height_class.temp);"> <nobr id="rolltable1" name="rolltable1" style="position:relative;">
<div style="text-align:center;padding-bottom:5px;"> <img src="
http://www.smellnone.co.kr/data/item/1252724507_s" border="0"> </div>
<div style="text-align:center;padding-bottom:5px;"> <img src="
http://www.smellnone.co.kr/data/item/1252724507_s" border="0"> </div>
</nobr> </div>
</td>
</tr>
</table>
<script language="Javascript">
{
// 세로롤링 설정키
var roll_init1=new Array();
roll_init1.constrain_size=null; // 전체의 넓이값 [기본 default]
roll_init1.tick=1; // 움직이는 칸수
roll_init1.ftick=10; // 빠른 움직이는 칸수
roll_init1.lengthen=10; // 1초당 움직이는 속도
roll_init1.delay=2000; // 잠시멈춤 속도
roll_init1.fall=false; // 이동 반대로 설정 ~
roll_init1.fast=false; // 빠른속도:true 는 on 이며,false 는 off 이다.
roll_init1.foundvalue ='DIV'; // Nobr 내부엘리멘트
roll_init1.moving='top'; // 상하좌우 움직임 설정
roll_init1.roll=document.getElementById('rolltable1'); // roll
roll_init1.proll=document.getElementById('parent_rolltable1'); // proll
};
{
// 세로롤링 선언부분
var height_class=new roll_Class('height_class',roll_init1);
height_class.inaction();
};
</script>
</body></html>
댓글 영역