I have sequence of images on timeline . I want to move timeline forward and backward using right click mouse. Click right mouse + x axis mouse ? by action script 2
1 Answers
Right mouse click was added in as3 in Flash player 11/12 and not from the beginning, I don't think AS2 has any way to do this because:
- AS2 runs on AVM 1, while AS3 that has support for right mouse click runs on AVM 2
- AS2 is officially not supported by Adobe for over a year - I don't think they'll ever add right mouse click support
Otherwise, if left-mouse click is ok for you, you can access the mouse position with _xmouse and get the delta to know the direction by saving the x/y position on mouse down and then on enter frame check the difference. Setting the timeline's current frame should probably be done through use of gotoAndStop(frameNumber), otherwise it would be hard to play the timeline "backward". If you want to escape the hassle of manipulating the timeline take a look at what TweenLite/TweenMax has to offer:
http://www.greensock.com/tweenmax/
It has features to tween the timeline backwards or forward with all the tween engine goodies like changing speed and even easing functions!

- 3,143
- 3
- 28
- 47