flash/Tip | 2006/07/31 11:34
mouse 반응에 따라 그리고 화면 사이즈에 따라 image movieclip 이 scroll 되도록 제작하려면 상황이 제작할때마다 달라 상당히 번거로웠는데 모든 경우를 일반활 할 수 있도록 모듈을 제작했다.


scroll_mc ---> 스크롤될 무비클립

scroll_mc._height > Stage.height 일 경우에만 --> scroll Active!!!

*limit position setting : mouse 가 화면에서 움직일경우 scroll_mc이 움직일수 있는 한계값을설정
Top--> Stage.height - scroll_mc._height
Bottom---> 0

*화면사이즈에 비례한 단위 움직임 계산

Stage.height : (Bottom-Top) = 1 : x

x= -(Bottom-Top)/Stage.height
= Top/Stage.height
= Stage.height - scroll_mc._height / Stage.height
= 1- scroll_mc._height/Stage.height

따라서 , 현재 mouse point 좌표값(Ymouse) 에서 scroll_mc 의 Target position !!!

==> Ymouse * 1- scroll_mc._height/Stage.height

 
 
태그 : , ,
이 글의 관련글(트랙백) 주소 :: http://kimkijeung.com/trackback/41

Name 
Password 
Homepage 
  secret
Comment 
  글쓰기


[PREV] [1] ... [64][65][66][67][68][69][70][71][72] ... [105] [NEXT]

 
전체 (105)
flash (74)
math&physics (4)
programming (11)
Flex2 (1)
Mac (2)
photo (0)
project (6)
주저리주저리 (3)
유용한 자료들 (1)
diary (0)
Book (1)
web (2)
«   2009/01   »
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31