开发者

Dragging with inertia in AS3 for dummies

开发者 https://www.devze.com 2023-01-05 08:16 出处:网络
I\'m trying to create an inertia effect for dragging that\'s constricted to the x axis. I know this questions was asked before here but 开发者_Go百科I couldn\'t understand the answer!

I'm trying to create an inertia effect for dragging that's constricted to the x axis. I know this questions was asked before here but 开发者_Go百科I couldn't understand the answer!

I'm currently using startDrag and stopDrag. I'm assuming I should add something to the startDrag function that captures the speed in which the user is moving the mouse, but I'm not sure how this is done. I guess then I'd add something to the stopDrag function that kicks in and makes the object keep moving at that speed and then come to a stop.

Any suggestions?


I've found an grat online tutorial that has the answer. I was a matter of tinkering with the code. The writer even has .fla files for download.

http://www.quasiuseful.com/?id=11

0

精彩评论

暂无评论...
验证码 换一张
取 消