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

마우스따라 움직이는 무비클립

by 어린양01 2016. 1. 9.

 


스위시맥스4 스크립트작품13(마우스따라 움직이는 무비클립)

무비 700X500으로 창에맞추고

1.그림한장 불러온다(Import! image로) Transform 패널에서 O=X
   센타 X=350 Y=250 W=600 H=400 으로

2. 무비클립 꽃 소스를 불러온다(Import! Animation으로) 스테지 좌측
   상단에 논다 O=X 센타 X=59.65 Y=46.05
   아웃라인의 아래는 그림 위는 꽃 소스

3. +로된 꽃 소스선택 스크립트클릭
   Add script→Event→Frame→onSelfEvent(load)엔타치고
   this.speed=5;입력 (움직이는 속도) 다시
   Add script→Event→Frame→onSelfEvent(enterFrame)클릭엔타치고
   this._x +=(_root._xmouse-this._x)/this.speed; 엔타치고
   this._y +=(_root._ymouse-this._y)/this.speed;입력

스크립트 패널창에 설정된모양

 onSelfEvent (load) {
    this.speed = 5;
}
onSelfEvent (enterFrame) {
    this._x += (_root._xmouse-this._x)/this.speed;
    this._y += (_root._ymouse-this._y)/this.speed;
}

 

 

마우스를 연속으로 따라다니는 무비.swi

 

 

 

마우스를 연속으로 따라다니는 무비.swi
0.03MB

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

Rectangle_rounded Mask Gallery  (0) 2016.01.10
마우스 따라가는 파노라마 버튼 겔러리  (0) 2016.01.10
12, 36개의 버튼  (0) 2016.01.09
release버튼  (0) 2016.01.09
복제2  (0) 2016.01.09