본문 바로가기
  • 오직 예수 그리스도
스위시세상/스위시 고급

Script Gallery

by 어린양01 2015. 8. 12.

 

Script Gallery

무비 800X500
1. 무비크기로 사각그려 라인=none, solid, W=800 H=500 O=X
   Center X=400 Y=250으로 하고 4X4로 조각내어 ungroup하고 이
   름 1~16으로하고 모두 O=X Center인 상태의 좌표값과 W,H를 모
   두 적어두고 (이것은 스크립트의 크기와 좌표가 된다)
   모두삭제한다 스크립트의 좌표를 알기 위한것이다

2. 이미지 1장 불러와 W=800 H=500 O=X Center X=400 Y=250으로
   하고 무비클립으로 묶고 이름 m1로 m1에스크립트 넣고 복사하여
   총 16개 만들고 이름 m1~16으로, 스크립트를 바꿔주고

3. 16개 모두 무비클립으로 묶고 이름 main으로 main에 스크립트 넣
   어주고 O=X Center X=400 Y=250으로 하고 Yscale=80%로 하고
   반듯이 좌상에 놓세요

4. 배경이미지 한 장 불러와 창에 맞추고 Window→Tint→Alpha의
   Custom 클릭하고 60으로하고 이름 bg로 맨 아래로 내려주고 사각
   그려 라인=none, solid, 색=배경과 어울리는색으로 하고 꾸미세요



m1에 스크립트

onFrame (1){
stop();
this.onPress = function (){
this.isDown = !this.isDown;
if(this.isDown==true){
this.gallery(0.2, 400, 250, 800, 500); //여기서 dhis는 m1이다

_parent.m2.gallery (0.2, 300, 62.5, 1, 1); //300=X값이고 62.5=Y이며 1=W, 1=H값이다
_parent.m3.gallery (0.2, 500, 62.5, 1, 1);
_parent.m4.gallery (0.2, 700, 62.5, 1, 1);
_parent.m5.gallery (0.2, 100, 187.5, 1, 1);
_parent.m6.gallery (0.2, 300, 187.5, 1, 1);
_parent.m7.gallery (0.2, 500, 187.5, 1, 1);
_parent.m8.gallery (0.2, 700, 187.5, 1, 1);
_parent.m9.gallery (0.2, 100, 312.5, 1, 1);
_parent.m10.gallery (0.2, 300, 312.5, 1, 1);
_parent.m11.gallery (0.2, 500, 312.5, 1, 1);
_parent.m12.gallery (0.2, 700, 312.5, 1, 1);
_parent.m13.gallery (0.2, 100, 437.5, 1, 1);
_parent.m14.gallery (0.2, 300, 437.5, 1, 1);
_parent.m15.gallery (0.2, 500, 437.5, 1, 1);
_parent.m16.gallery (0.2, 700, 437.5, 1, 1);
}else{
_parent.init();
}
};
}




main에 스크립트

function init(){
m1.gallery (0.2, 100, 62.5, 200.3, 125); //100=X, 62.5=Y, 200.3=W, 125=H,이다
m2.gallery (0.2, 300, 62.5, 200.3, 125);
m3.gallery (0.2, 500, 62.5, 200.3, 125);
m4.gallery (0.2, 700, 62.5, 200.3, 125);
m5.gallery (0.2, 100, 187.5, 200.3, 125);
m6.gallery (0.2, 300, 187.5, 200.3, 125);
m7.gallery (0.2, 500, 187.5, 200.3, 125);
m8.gallery (0.2, 700, 187.5, 200.3, 125);
m9.gallery (0.2, 100, 312.5, 200.3, 125);
m10.gallery (0.2, 300, 312.5, 200.3, 125);
m11.gallery (0.2, 500, 312.5, 200.3, 125);
m12.gallery (0.2, 700, 312.5, 200.3, 125);
m13.gallery (0.2, 100, 437.5, 200.3, 125);
m14.gallery (0.2, 300, 437.5, 200.3, 125);
m15.gallery (0.2, 500, 437.5, 200.3, 125);
m16.gallery (0.2, 700, 437.5, 200.3, 125);
}
onFrame (1){
k = 1;
MovieClip.prototype.gallery = function (speed, targetx, targety, width, height){
this.onEnterFrame = function (){
this._x += speed * (targetx - this._x);
this._y += speed * (targety - this._y);
this._width += (width - this._width) / 5;
this._height += (height - this._height) / 5;
};
};
for (i = 1; i <= 16; i++) {
this["b" + i].onRollOver=function(){
this.swapDepths(k++);
this.gotoAndPlay(2);
};
}
init();
}

 

 

 

Script Gallery.swi
Script Gallery.swi
5.33MB

'스위시세상 > 스위시 고급' 카테고리의 다른 글

로테이션 갤러리  (0) 2015.08.28
Script button & mask Gallery  (0) 2015.08.28
스크립트 버튼 갤러리  (0) 2015.08.12
Sliding Button Gallery  (0) 2015.08.12
Break Wild-Spring Gallery  (0) 2015.08.12