플래시로 윈도우 시스템을 흉내내보자.

· 21년 전 · 2160
파일을 다운받으셔서 액션이 어떤 역활을 하는지 보시면 이해가 쉽습니다.






//outlinewindow(테두리)를 보이지 않게 한다.
//현제 최초값을 설정한다.
_root.outlinewindow._visible=false;
_root.window.targetX=_root.outlinewindow._x=_root.window._x;
_root.window.targetY=_root.outlinewindow._y=_root.window._y;

//bnMax 버튼을 누르면 sub가 보이게한다.
_root.window.bnMax.onRelease=function(){
_root.window.sub._visible=true;
};
//bnMin버튼을 누르면 sub가 안보이게한다.
_root.window.bnMin.onRelease=function(){
_root.window.sub._visible=false;
};
//bnTitle에 마우스를 올렸을때 드래그가 되도록 한다.
_root.window.bnTitle.onPress=function(){
_root.window.startDrag();
}
//window에서 마우스를 놓을때 outlinewindow를 가리고,
//해당 타켓X,Y값에 현제 outlinewindow_x,_y값을 삽입하고 드래그를 멈춘다
_root.window.onMouseUp=function(){
_root.outlinewindow._visible=false;
//_root.window._x=_root.outlinewindow._x;
//_root.window._y=_root.outlinewindow._y;
_root.window.targetX=_root.outlinewindow._x;
_root.window.targetY=_root.outlinewindow._y;
stopDrag();
}
//부드럽게 이동하는 공식
_root.window.onEnterFrame=function(){
this._x+=0.3*(this.targetX-this._x);
this._y+=0.3*(this.targetY-this._y);
}
//onMiuseUp과 같은 내용
/*_root.window.bnTitle.onRelease=function(){
_root.window.stopDrag();
}
_root.window.bnTitle.onReleaseOutside=function(){
_root.window.stopDrag();
}
*/
//bnTitle를 눌렀을때 outlinewindow를 보이게 하며 드래그할 수 있게 한다.
_root.window.bnTitle.onPress=function(){
if(_root.window.sub._visible){
//outlinewindow내의 1번프레임에서 멈춘다.
_root.outlinewindow.gotoAndStop(1);
}else{
//outlinewindow내의 2번프레임에서 멈춘다.
_root.outlinewindow.gotoAndStop(2);
}
_root.outlinewindow._visible=true;
_root.outlinewindow.startDrag();
}

첨부파일

windowSystem_자료.fla (416 KB) 40회 2004-07-13 18:43
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누3 팁자료실

+
제목 글쓴이 날짜 조회
21년 전 조회 4,121
21년 전 조회 2,909
21년 전 조회 2,231
러브레터
21년 전 조회 4,581
21년 전 조회 3,787
21년 전 조회 3,697
21년 전 조회 2,759
21년 전 조회 2,454
21년 전 조회 2,087
21년 전 조회 2,161
21년 전 조회 2,428
21년 전 조회 2,354
21년 전 조회 2,611
러브레터
21년 전 조회 2,856
21년 전 조회 2,596
이영준
21년 전 조회 3,132
21년 전 조회 2,299
이영준
21년 전 조회 2,869
이영준
21년 전 조회 2,518
21년 전 조회 2,120
🐛 버그신고