Script button & mask Gallery
무비 800X500
1. 이미지 한 장 불러와 W=800 H=500, O=X Center X=400 Y=250
으로 놓고 복사하여 붙여넣고 Y에 1+ 해주고 물결 불러와 복사본
아래로 내려 위 이미지와 무비클립으로 묶고 마스크체크 이름 W
로,
2. mask불러와 O=X Center X=400 Y=250 W=800 H=500으로 맨 아
래로 내려놓고 아래서부터 mask, 이미지, w, 3개를 무비클립으로
묶고 마스크체크, 이름 img1로하고 스크립트 넣고 잘되는지 확인
해 본다
3. img1 복사하여 총 10개 만들고 이름 im1~img10으로 하고 스크립
트 고쳐주는데 img2선택 스크립트의 img2를 img1로 교쳐주고,
img3선택 스크립트의 img3를 img1로 교쳐주고 이렇게 img5까지
고쳐주고 img6선택 스크립트의 img6를 img1로, 910을 -110으로
고쳐주고, img7선택 스크립트의 img7를 img1로 교쳐주고 910을
-110으로 이미지도 바꿔주고 이렇게 img10까지 고쳐주고
4. img1~img10,까지선택 무비클립으로 묶고 O=X Center X=400
Y=250에놓고 다시 좌상에 놓고 포인트점 끌어다 X=0 Y=0, 지점에
놓고 이름 main으로하고 스크립트 넣어주고 확인 해 보고 필터 2개
준다
5. bg영상 불러와 창에 맞추고 Window→Tint→Alpha의 Cstom선택
60으로하고 맨 아래로 내려주고 사각그려 창에 맞추고 라인=none,
solid, 색은 배경 보면서 어울리는 색으로하고 맨 아래로 내려준다
6. flv소스는 배경에는 넣어되고 main 위에 넣으면 버튼이 작동이 안
되기 때문에 swf 파일주소를 넣는게 좋다, 나머지 예쁘게 꾸미세요
2015.6.24일 오전 12시에 수정 했습니다. 마스크 만들기는 답글에
main열고 img1~img10에
onFrame (1){
stop();
this.onPress = function (){
this.isDown = !this.isDown;
if(this.isDown==true){
this.gallery(0.2, 400, 250, 800, 500);
_parent.img10.gallery(0.2, -110, 480, 200, 150); //자기번호는 빼고 다른번호는 밖으로 내 보낸다 즉 X=-110
_parent.img2.gallery(0.2, 910, 120, 200, 150);
_parent.img3.gallery(0.2, 910, 240, 200, 150);
_parent.img4.gallery(0.2, 910, 360, 200, 150);
_parent.img5.gallery(0.2, 910, 480, 200, 150);
_parent.img6.gallery(0.2, -110, 0, 200, 150);
_parent.img7.gallery(0.2, -110, 120, 200, 150);
_parent.img8.gallery(0.2, -110, 240, 200, 150);
_parent.img9.gallery(0.2, -110, 360, 200, 150);
mask.gotoAndPlay(2);
}else{
_parent.init();
}
};
}
main에 스크립트
function init(){
img1.gallery(0.2, 325, 120, 200, 150);
img2.gallery(0.2, 275, 180, 200, 150);
img3.gallery(0.2, 225, 240, 200, 150);
img4.gallery(0.2, 175, 300, 200, 150);
img5.gallery(0.2, 300, 370, 200, 150);
img6.gallery(0.2, 450, 380, 200, 150);
img7.gallery(0.2, 495, 320, 200, 150);
img8.gallery(0.2, 525, 270, 200, 150);
img9.gallery(0.2, 575, 210, 200, 150);
img10.gallery(0.2,625, 150, 200, 150);
}
onFrame (1){
kim = 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 <= 10; i++) {
this["img" + i].onRollOver=function(){
this.swapDepths(kim++);
this.gotoAndPlay(2);
};
}
init();
}
Script button & mask Gallery.swi
Script button & mask Gallery.swf
'스위시세상 > 스위시 고급' 카테고리의 다른 글
Slide Button Gallery (0) | 2015.09.07 |
---|---|
로테이션 갤러리 (0) | 2015.08.28 |
Script Gallery (0) | 2015.08.12 |
스크립트 버튼 갤러리 (0) | 2015.08.12 |
Sliding Button Gallery (0) | 2015.08.12 |