최신게시물인데요 속도조절... 정보
최신게시물인데요 속도조절...
본문
이미지가 바뀌는
최신 게시물인데요.
속도조절을 하고 싶은데 어디서 하는지 모르겠어요.;;;
=============================================================================
latest.skin.php 파일
=============================================================================
=============================================================================
rolling.js 파일
=============================================================================
최신 게시물인데요.
속도조절을 하고 싶은데 어디서 하는지 모르겠어요.;;;
=============================================================================
latest.skin.php 파일
=============================================================================
<?
//if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/lib/thumb.lib.php");
$img_x = '533'; //큰 썸네일 가로길이
$img_y = '265'; //큰 썸네일 세로길이
$img_sx = '60'; //작은 썸네일 가로길이
$img_sy = '30'; //작은 썸네일 세로길이
$img_q = '90'; //퀼리티 100이하로 설정
$img_hy = $img_sy + 10;
?>
<SCRIPT src="<?=$latest_skin_path?>/rolling.js" type=text/javascript></SCRIPT>
<style type="text/css">
#main { WIDTH: <?=$img_x?>px; TEXT-ALIGN: left; }
.SlideMainRoll { FILTER: progid:DXImageTransform.Microsoft.Slide(slidestyle=SWAP,Bands=1); CURSOR: pointer; }
#SlideMain { OVERFLOW: hidden; WIDTH: <?=$img_x?>px; HEIGHT: <?=$img_y?>px; }
#SlideMenu { MARGIN: -60px 0px 0px 20px; WIDTH: <?=$img_x?>px; POSITION: absolute; HEIGHT: <?=$img_hy?>px; }
#SlideMenu UL { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: none;}
#SlideMenu UL LI { BACKGROUND: none transparent scroll repeat 0% 0%; FLOAT: left; MARGIN: 5px; OVERFLOW: hidden; WIDTH: <?=$img_sx?>px; HEIGHT: <?=$img_sy?>px; }
#SlideMenu UL LI IMG { BORDER-RIGHT: #171717 1px solid; BORDER-TOP: #c2c2c2 1px solid; OVERFLOW: hidden; BORDER-LEFT: #c2c2c2 1px solid; WIDTH: <?=$img_sx?>px; BORDER-BOTTOM: #171717 1px solid; HEIGHT: <?=$img_sy?>px; }
.SlideMenuOver { FILTER: alpha(opacity=100); -moz-opacity: 1;}
.SlideMenuOut { FILTER: alpha(opacity=30); -moz-opacity: 0.3;}
</style>
<DIV id=main>
<DIV id=slide style="margin-top:0px; padding:0px; border-width:0px; border-color:rgb(25,25,25); border-style:solid; float:left; WIDTH: <?=$img_x?>px; HEIGHT: <?=$img_y?>px">
<!-- slide start -->
<SCRIPT language=javascript>
var m_nPageInitTime = new Date();
var MainTopRoll = new xwzRollingImageTrans("IMG_MAIN_TOP_ROLL_DETAIL", "IMGS_MAIN_TOP_ROLL_THUMBNAIL");
<?
// case IMG_FILTER_UBSHARPMASK: UnsharpMask($target, $filter[arg1], $filter[arg2], $filter[arg3]);
// function UnsharpMask($img, $amount, $radius, $threshold)
$filter[type] = 99;
$filter[arg1] = 100;
$filter[arg2] = 1;
$filter[arg3] = 2;
?>
<? for ($i=0; $i<count($list); $i++) {
$ca = $i+1;
$file= $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
$file1= $list[0][file][0][path] .'/'. $list[0][file][0][file];
$img= thumbnail($file, $img_x, $img_y, 0, 2, $img_q, "", $filter);
//$img_s= thumbnail($file, $img_sx, $img_sy, 0, 2, $img_q, "", $filter);
//$subject = cut_str(strip_tags($list[$i]['subject']),60);
//$img_[$ca] = thumbnail($file[$ca], $thumb_x, $thumb_y, 0, 2, 90, "", $filter);
?>
MainTopRoll.addItem("<?=$list[$i]['wr_link1']?>","<?=$img?>");
<? } ?>
</SCRIPT>
<DIV id=SlideMain><IMG class=SlideMainRoll height=<?=$img_y?>
src="<?=$file1?>"
width=<?=$img_x?> border=0 name=IMG_MAIN_TOP_ROLL_DETAIL> </DIV>
<DIV id=SlideMenu>
<UL>
<?
// case IMG_FILTER_UBSHARPMASK: UnsharpMask($target, $filter[arg1], $filter[arg2], $filter[arg3]);
// function UnsharpMask($img, $amount, $radius, $threshold)
$filter[type] = 99;
$filter[arg1] = 100;
$filter[arg2] = 1;
$filter[arg3] = 2;
?>
<? for ($i=0; $i<count($list); $i++) {
$ca = $i+1;
$file= $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
$img_s= thumbnail($file, $img_sx, $img_sy, 0, 2, $img_q, "", $filter);
?>
<LI class=SlideMenuOut id=<?=$i?>-l
onmouseover="document.getElementById('<?=$i?>-l').className='SlideMenuOver'"
onmouseout="document.getElementById('<?=$i?>-l').className='SlideMenuOut'"><IMG
style="DISPLAY: none" height=5
src="<?=$list[$i]['href']?>"
width=9 align=absMiddle border=0 name=IMGS_MAIN_TOP_ROLL_THUMBNAIL> <IMG
onmouseover=MainTopRoll.alterImage(<?=$i?>) style="CURSOR: pointer" height=50
src="<?=$img_s?>"
width=50 border=0> </LI><? } ?>
</UL></DIV>
<SCRIPT language=JavaScript>
MainTopRoll.Index = parseInt('0');
MainTopRoll.install();
</SCRIPT>
<!-- slide end -->
=============================================================================
rolling.js 파일
=============================================================================
/******************************* Function of slide code *******************************/
function xwzImgRollOver(oImg, bType, sSrc){
if(bType == true){
if( oImg.getAttribute('xwzAlreadySrc') == null) oImg.setAttribute('xwzAlreadySrc', oImg.src);
oImg.src = sSrc;
}else{
if( oImg.getAttribute('xwzAlreadySrc') != null) oImg.src = oImg.getAttribute('xwzAlreadySrc');
}
}
function xwzRollingImageTrans(imageName, thumbnailName, eventName, winName){
this.Index = 0;
this.ListItem = new Array(0);
this.Name = imageName;
this.Thumbnail = thumbnailName;
this.tmRotate = null;
this.nInterval = 4500;
this.eventName = eventName;
this.winTarget = winName;
if(window.xwzRollObject == null) window.xwzRollObject = new Array(0);
window.xwzRollObject[this.Name] = this;
this.install = function(){
window.document.images[this.Name].onclick=this.goLink;
if(this.ListItem.length == 0) return;
this.tmRotate = setTimeout("window.xwzRollObject['" + this.Name + "'].rotateTrans()" , this.nInterval);
var icons = document.getElementsByName(this.Thumbnail);
for(var i = 0; i < icons.length; i++){
if(this.eventName == 'over') icons[i].onmouseover=new Function("window.xwzRollObject['"+this.Name+"'].alterImage(" + i + ")");
else icons[i].onclick=new Function("window.xwzRollObject['"+this.Name+"'].alterImage(" + i + ")");
}
}
this.addItem = function(Link, ImgSrc, Icon1, Icon2 ){
var itmX = {Link : "", ImgSrc : "", DefIcon : "", OvrIcon : ""};
itmX.Link = Link;
itmX.ImgSrc = ImgSrc;
itmX.DefIcon = Icon1;
itmX.OvrIcon = Icon2;
this.ListItem[this.ListItem.length] = itmX;
}
this.alterImage = function(index){
var icons = document.getElementsByName(this.Thumbnail);
if(this.Index == index) return;
if(this.ListItem[this.Index].DefIcon !="") icons[this.Index].src = this.ListItem[this.Index].DefIcon;
this.Index = index;
this.imgTrans();
clearTimeout(this.tmRotate);
this.tmRotate = null;
this.tmRotate = setTimeout("window.xwzRollObject['" + this.Name + "'].rotateTrans()" , this.nInterval);
}
this.goLink = function(){
var name = this.getAttribute('name');
var xwzRoll = window.xwzRollObject[name];
clearTimeout(xwzRoll.tmRotate);
xwzRoll.tmRotate = null;
xwzRoll.winTarget="_self";
if(xwzRoll.winTarget == '' || xwzRoll.winTarget == null){
window.location.href=xwzRoll.ListItem[xwzRoll.Index].Link;
}else{
window.open(xwzRoll.ListItem[xwzRoll.Index].Link, xwzRoll.winTarget);
}
}
this.rotateTrans = function(){
var icons = document.getElementsByName(this.Thumbnail);
var itmX = this.ListItem[this.Index];
if(itmX.DefIcon !="") icons[this.Index].src = itmX.DefIcon;
this.Index +=1;
if(this.Index >= this.ListItem.length) this.Index = 0;
this.imgTrans();
clearTimeout(this.tmRotate);
this.tmRotate = null;
this.tmRotate = setTimeout("window.xwzRollObject['" + this.Name + "'].rotateTrans()" , this.nInterval);
}
this.imgTrans = function(){
var icons = document.getElementsByName(this.Thumbnail);
var itmX = this.ListItem[this.Index];
if(itmX.OvrIcon !=null && itmX.OvrIcon !="") icons[this.Index].src = itmX.OvrIcon;
try{
document.images[this.Name].filters[0].apply();
document.images[this.Name].src = itmX.ImgSrc;
document.images[this.Name].filters[0].play();
}catch(e){
document.images[this.Name].src = itmX.ImgSrc;
}
}
}
function xwzRollingMarqTrans(Name, eventName){
this.Name = Name;
this.Index = 0;
this.ListItem = new Array(0);
this.tmRotate = null;
this.nInterval = 4500;
this.eventName = eventName;
if(window.xwzMarqObject == null) window.xwzMarqObject = new Array(0);
window.xwzMarqObject[this.Name] = this;
this.install = function(){
if(this.ListItem.length == 0) return;
this.tmRotate = setTimeout("window.xwzMarqObject['" + this.Name + "'].rotateTrans()" , this.nInterval);
for(var i = 0; i < this.ListItem.length; i++){
if(this.eventName == 'over') this.ListItem[i].Img.onmouseover=new Function("window.xwzMarqObject['"+this.Name+"'].alterTrans(" + i + ")");
else this.ListItem[i].Img.onclick=new Function("window.xwzMarqObject['"+this.Name+"'].alterTrans(" + i + ")");
}
}
this.addItem = function(targetObj, targetImg, Icon1, Icon2 ){
var itmX = {Objects : null, Imgs : null, DefaultSrc : "",OverSrc : ""};
itmX.Object = targetObj;
itmX.Img = targetImg;
itmX.DefaultSrc = Icon1;
itmX.OverSrc = Icon2;
this.ListItem[this.ListItem.length] = itmX;
}
this.alterTrans = function(index){
if(this.Index == index) return;
var itmX = this.ListItem[this.Index];
if(itmX.DefaultSrc !="") itmX.Img.src = itmX.DefaultSrc;
this.Index = index;
this.objTrans();
clearTimeout(this.tmRotate);
this.tmRotate = null;
this.tmRotate = setTimeout("window.xwzMarqObject['" + this.Name + "'].rotateTrans()" , this.nInterval);
}
this.rotateTrans = function(){
var itmX = this.ListItem[this.Index];
if(itmX.DefaultSrc !="") itmX.Img.src = itmX.DefaultSrc;
this.Index +=1;
if(this.Index >= this.ListItem.length) this.Index = 0;
this.objTrans();
clearTimeout(this.tmRotate);
this.tmRotate = null;
this.tmRotate = setTimeout("window.xwzMarqObject['" + this.Name + "'].rotateTrans()" , this.nInterval);
}
this.objTrans = function(){
var itmX = this.ListItem[this.Index];
if(itmX.Img !=null && itmX.OverSrc !="") itmX.Img.src = itmX.OverSrc;
for(var i =0; i < this.ListItem.length; i++) this.ListItem[i].Object.style.display = 'none';
try{
itmX.Object.filters[0].apply();
itmX.Object.style.display='';
itmX.Object.filters[0].play();
}catch(e){
itmX.Object.style.display='';
}
}
}
댓글 전체

this.nInterval = 4500;
이부분이 아닐까 합니다. 클수록 느려지지 않을까요.
이부분이 아닐까 합니다. 클수록 느려지지 않을까요.

l2zeo님 감사합니다. ^^