플래시 액션스크립트 depths 에 관해 질문드려요

· 14년 전 · 1599
일단 이게 소스구요
지금은 가운데 이미지가 제일 앞쪽으로 나와서 롤링되는 플래시인데
반대로 가운데 이미지가 제일 뒤편으로 가고 양옆 두개가 앞으로 나왔으면 좋겠거든요
 
근데 어디를 수정해야 하는지 잘 모르겠어요..제발 부탁드립니다
 

 
//메뉴의 총 갯수
var total:Number = 3;
// 회전하는 원의 가로지름
var radiusX:Number = 240;
// 회전하는 원의 세로지름
var radiusY:Number = 70;
// 회전하는 원의 X좌표 중심점
var centerX:Number = 600;
// 회전하는 원의 Y좌표 중심점
var centerY:Number = 415
//회전하는속도
var speed:Number = 0.2;
// 자동롤링 스피드(간격 //  1초가 1000)
//var Rspeed:Number = 6500;
// 최대스케일
var maxScale:Number = 100;
// 최소스케일
var minScale:Number = 50;
// 최대투명도
var maxalpha:Number = 100;
// 최소투명도
var minalpha:Number = 100
// 메뉴간의 거리
var distance:Number = 2 * Math.PI/total;
// 알파값조정(0을 기준으로 하세요~ 투명도 적용하려면 161,166,번라인앞에 //로 주석처리하세요)
var alphaNum:Number = 5;
// 초기상태 오른쪽롤링
var isPlay = "right"
// 로드파일 이미지명
var filepath:String = "img_"
// 로드파일 확장자명
var fileType:Array = new Array();
fileType[0] = ".swf"
fileType[1] = ".swf"
fileType[2] = ".swf"

//////////////// *************** 이하의 내용은 수정을 권장하지 않습니다***************////////////////
this.menu._visible = false;
for( var i = 0; i < total; ++i)
{
 var mc = this.menu.duplicateMovieClip( "menu" + i, i );
 mc.no = i
 mc.PlayNum = i
 mc.screen.loadMovie( filepath + i + fileType[i]);
 mc.angle = 2 * Math.PI * i / total
 mc.Position = 2 * Math.PI * (i) / total + (2*Math.PI/4);
 mc.tempPos = mc.Position;
 mc.screen.gotoAndStop(1);
 mc._alpha = 0;
 //////////****** 이미지 클릭시 돌아갈 액션 *******///////////////////
 mc.img_btn.onRollOver = function()
 {
  //clearInterval(id)
 }
 mc.img_btn.onRollOut = function()
 {
  //id = setInterval(auto, Rspeed)
 }
 mc.img_btn.onRelease = function()
 {
  if( this._parent.PlayNum == 0 )
  {
   getURL(link_list[this._parent.no], "_self");  //링크 타겟을 설정하기(현재창: _self, 새창:_blank, 특정프레임:프레임네임)
  } else
  {
   if( this._parent._x > centerX )
   {
    Pos = total - this._parent.PlayNum;
    isPlay = "right"
    Rolling(Pos);
   } else
   {
    Pos = this._parent.PlayNum;
    isPlay = "left"
    Rolling(Pos);
   }
  }
 }
 if( mc.PlayNum == 0 )
 {
  mc._xscale = mc._yscale = maxScale;
 }
 else
 {
  mc._xscale = mc._yscale = minScale;
 }
 var de_age:Number = 0;
 
}
//////////****** 롤링버튼(좌,우버튼) 클릭시 돌아갈 액션 *******//////////
 
this.r_btn.onRelease = function()
{
 isPlay = "right"
 Rolling(1)
};
this.l_btn.onRelease = function()
{
 isPlay = "left"
 Rolling(1)
};
this.r_btn.onRollOver = this.l_btn.onRollOver = function()
{
 this.go_Play = "true"
 btnFc( this )
 //clearInterval(id)
};
this.l_btn.onRollOut = this.r_btn.onRollOut = function()
{
 this.go_Play = "false"
 btnFc( this )
 //id = setInterval(auto, Rspeed)
};
 
// 위치 및 깊이 스케일 설정
function mover():Void
{
 var age:Number = 0
 this.onEnterFrame = function()
 {
  if( ++age < 40 )
  {
   for( var i = 0; i < total; ++i )
   {
    var mc = _root["menu" + i];
    mc._x = Math.cos( mc.angle ) * radiusX + centerX;
    mc._y = Math.sin( mc.angle ) * radiusY + centerY;
    mc.angle += speed * ( mc.Position - mc.angle );
    mc.swapDepths( Math.round( mc._xscale ) + 100 );
    if( mc.PlayNum == 0 )
    {
     mc.screen.play();
     mc._xscale = mc._yscale += speed * ( maxScale - mc._xscale );
     mc._alpha += 0.2 * ( maxalpha - mc._alpha );
    }else
    {
     mc.screen.gotoAndStop(1);
     mc._xscale = mc._yscale += speed * ( minScale - mc._xscale );
     mc._alpha += 0.2 * ( minalpha - mc._alpha );
    }
   }
  }else  delete this.onEnterFrame; 
 }
}
// 회전함수
function Rolling( Pos2 )
{
 Pos = Pos2-1
 mover()
 for( var i = 0; i < total; ++i )
 {
  var mc = this["menu"+i];
  if( isPlay == "right" )
  {
   mc.Position = mc.tempPos + 2 * Math.PI/total + distance * ( Pos );
   mc.tempPos = mc.Position;
   for( var j = 0; j <= Pos; ++j )
   {
    if( mc.PlayNum == total -1 )
    {
     mc.PlayNum = 0;
    } else
    {
     mc.PlayNum++;
    }
   }
  } else
  {
   mc.Position = mc.tempPos - 2 * Math.PI/total - distance * (Pos);
   mc.tempPos = mc.Position;
   for( var j = 0; j <= Pos; ++j )
   {
    if( mc.PlayNum == 0 )
    {
     mc.PlayNum = total - 1;
    } else
    {
     mc.PlayNum--;
    }
   }
  }
 }
}
//자동롤링 함수
function auto()
{
 Rolling(1)
}
function btnFc( mc:MovieClip ):Void
{
 var btn_age:Number = 0;
 mc.onEnterFrame = function()
 {
  if( ++btn_age < 10 )
   {
    if( this.go_Play == "true" ) this.nextFrame();
    else this.prevFrame();   
   }
 }
}
mover();

// var id = setInterval(auto, Rspeed)
[이 게시물은 관리자님에 의해 2011-10-31 16:50:06 Flash에서 이동 됨]
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
14년 전 조회 1,526
14년 전 조회 1,227
14년 전 조회 1,374
14년 전 조회 1,171
14년 전 조회 1,353
14년 전 조회 920
14년 전 조회 1,747
14년 전 조회 1,098
14년 전 조회 1,918
14년 전 조회 8,673
14년 전 조회 1,218
14년 전 조회 2,038
14년 전 조회 1,810
14년 전 조회 2,072
14년 전 조회 2,477
14년 전 조회 1,006
14년 전 조회 1,150
14년 전 조회 6,932
14년 전 조회 1,112
14년 전 조회 1,032
14년 전 조회 2,219
14년 전 조회 1,111
14년 전 조회 1,078
14년 전 조회 2,574
14년 전 조회 1,162
14년 전 조회 4,161
14년 전 조회 4,298
14년 전 조회 1,578
14년 전 조회 1,148
14년 전 조회 1,799
14년 전 조회 1,080
14년 전 조회 1,368
14년 전 조회 967
14년 전 조회 7,891
14년 전 조회 1,506
14년 전 조회 893
14년 전 조회 1,060
14년 전 조회 1,744
14년 전 조회 1,197
14년 전 조회 1,042
14년 전 조회 1,133
14년 전 조회 1,079
14년 전 조회 938
14년 전 조회 1,074
14년 전 조회 1,048
14년 전 조회 1,054
14년 전 조회 1,079
14년 전 조회 1,364
14년 전 조회 1,357
14년 전 조회 1,600
14년 전 조회 1,254
14년 전 조회 1,161
14년 전 조회 1,091
14년 전 조회 1,012
14년 전 조회 1,019
14년 전 조회 1,189
14년 전 조회 2,411
14년 전 조회 1,072
14년 전 조회 1,436
14년 전 조회 2,557
14년 전 조회 1,653
14년 전 조회 1,410
14년 전 조회 5,149
14년 전 조회 2,359
14년 전 조회 1,211
14년 전 조회 1,077
14년 전 조회 1,029
14년 전 조회 949
14년 전 조회 2,219
14년 전 조회 3,537
14년 전 조회 1,023
14년 전 조회 1,277
14년 전 조회 2,209
14년 전 조회 1,051
14년 전 조회 1,705
14년 전 조회 2,056
14년 전 조회 1.1만
14년 전 조회 1,575
14년 전 조회 1,402
14년 전 조회 2,109
14년 전 조회 2,157
14년 전 조회 1,348
14년 전 조회 1,423
14년 전 조회 1,233
14년 전 조회 2,892
14년 전 조회 1,026
14년 전 조회 1,190
14년 전 조회 2,230
14년 전 조회 2,515
14년 전 조회 945
14년 전 조회 1,375
14년 전 조회 1,132
14년 전 조회 1,191
14년 전 조회 1,386
14년 전 조회 1,200
14년 전 조회 1,103
14년 전 조회 926
14년 전 조회 906
14년 전 조회 1,202
14년 전 조회 1,270