흑흑 아직도 해결 못하고 있습니다 ㅠ.ㅠ..... > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

흑흑 아직도 해결 못하고 있습니다 ㅠ.ㅠ..... 정보

흑흑 아직도 해결 못하고 있습니다 ㅠ.ㅠ.....

본문

// 한페이지 내에서 게시판 2개에서 최신글을 스크롤 스킨을 적용 시켜서
// 화면에 뿌려 주려고 하는데요...
// 동시에 두개가 안먹어서...
// 스크롤 스킨을 복사한후... scroll 폴더와 scroll1 폴더를 만들고 scroll1 스킨의 자바스크립트중
// 변수 부분은 scroll 폴더의 스킨과 다른 변수를 주었습니다.
//
//
// 첫번째 는 scroll 폴더의 스크롤 스킨 전문이구요...(당연히 스크롤됩니다.)
// 두번째는 scroll1 폴더의 스크롤 스킨 전문인데...
// 개체가 매서드를 지원하지 않습니다 라는 에러생기고 스크롤은 되지가 않네요..

// 거의 3주째 고민중인데요... 흑흑 좀 도와주세요...

<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="220" border=0 cellpadding=0 cellspacing=0>
<tr>
<td width="243">
<script>
cont = new scroll();
cont.name = "cont";
cont.height = 22; cont.width = 220;
cont.scrollspeed = 20;
cont.pausedelay = 3500;
cont.pausemouseover = true;
<? for ($i=0; $i<count($list); $i++) { ?>
      cont.add("<table width=100%><tr><td height=20 colspan=2><a href='<?=$list[$i][href]?>'><font style='font-size:9.0pt;mso-bidi-font-size:14.0pt;font-family:굴림;mso-bidi-font-family:새굴림;mso-fareast-language:ZH-CN;color:#000000;'><?=$list[$i][subject]?></font></a></font></b></td></tr></table>");
<?}?>

cont.start(); </script>
</td>
</tr>

</table>


//**************************************************************
//여기까지가 scroll 스킨전문이구요...

// 여기서 부터는 scroll1 스킨의 전문입니다.
<script>
function varscroll() {
this.name = "varscroll";
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 vartext = arguments[0];
this.item[this.itemcount] = vartext;
this.itemcount = this.itemcount + 1;
};
this.start = function () {
this.display();
this.currentspeed = this.scrollspeed;
setTimeout(this.name+'.varscroll()',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 ii = 0; ii < this.itemcount; ii++) {if ( this.type == 1) {
document.write('<div id="'+this.name+'item'+ii+'"style="left:0px;width:'+this.width+';position:absolute;top:'+(this.height*ii+1)+'px;">');
document.write(this.item[ii]);
document.write('</div>');
}
else if ( this.type == 2 ) {
document.write('<div id="'+this.name+'item'+ii+'"style="left:'+(this.width*ii+1)+'px;width:'+this.width+';position:absolute;top:0px;">');
document.write(this.item[ii]);
document.write('</div>');
}
}
document.write('</div>');
};
this.varscroll = function () {
this.currentspeed = this.scrollspeed;if ( !this.stop ) {
for (ii = 0; ii < this.itemcount; ii++) {
obj = document.getElementById(this.name+'item'+ii).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+".varscroll()",this.currentspeed);
};
this.onmouseover = function () {
if ( this.pausemouseover ) {
this.stop = true;}
};
this.onmouseout = function () {
if ( this.pausemouseover ) {
this.stop = false;
}
};
}
</script>
<table width="220" border=0 cellpadding=0 cellspacing=0>
<tr>
<td width="243">
<script>
cont = new varscroll();
cont.name = "cont";
cont.height = 22; cont.width = 220;
cont.scrollspeed = 20;
cont.pausedelay = 3500;
cont.pausemouseover = true;
<? for ($ii=0; $ii<count($list); $ii++) { ?>
      cont.add("<table width=100%><tr><td height=20 colspan=2><a href='<?=$list[$ii][href]?>'><font style='font-size:9.0pt;mso-bidi-font-size:14.0pt;font-family:굴림;mso-bidi-font-family:새굴림;mso-fareast-language:ZH-CN;color:#000000;'><?=$list[$ii][subject]?></font></a></font></b></td></tr></table>");
<?}?>

cont.start(); </script>
</td>
</tr>

</table>

//*******************여기까지가 scroll1 폴더의 최신글 스크롤 스킨 소스입니다.


// 여기서 부터는 페이지내에서 최신글 스크롤 형태로 불러 들이는 소스이구요..

<TD><IMG SRC="img/mmain_02.gif" WIDTH=51 HEIGHT=24 ALT=""></TD>
<TD WIDTH=228 HEIGHT=24><p><?= latest("scroll", "process", 5, 35);?></p></TD>
<TD><IMG SRC="img/mmain_04.gif" WIDTH=70 HEIGHT=24 ALT=""></TD>
<TD WIDTH=228 HEIGHT=24><p><?= latest("scroll1", "process1", 5, 35);?></p></TD>
<TD><IMG SRC="img/mmain_06.gif" WIDTH=9 HEIGHT=24 ALT=""></TD>


// 고수님들... 무지한 초보에게 광명의 길을.... ㅠ.ㅠ
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로