Dragging with inertia in AS3 for dummies
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
精彩评论