1 Reply Latest reply on Feb 7, 2008 2:21 PM by mikejchung

    calculate mouse position

    mikejchung
      Hello all. I'm currently making an animated scroll. The animation is all done and consists of a very large background image (the scroll itself) and a movie clip of png's on top of that that represents the actual rolled section of the scroll unrolling. I have an empty movie clip on top of the flat scroll portion (actually a button embedded in a movie clip). I am using this empty clip to calculate the mouse. If the user clicks and drags i need the playhead of the movie to change. I can get this working correctly going forward but not going back. To go forward i take the _xmouse / 25 (the movie is about 400 frames long) and add it to the current frame number. (a variable i called cf). I think i might have to junk this method in favor of a new one, but i'm not really sure how to implement the new method. Essentially i'd need a value when pressed of zero then as the user drags the mouse (while still clicked) the value goes up or down based on the direction they're moving the mouse. Any ideas? Also i can't really use start and enddrag because the actual flat part of the scroll needed to be adjusted w/ tweens to match the rolling animation (if that makes any sense). I realize it probably would have been easier to just use startdrag and enddrag.