0
votes

I'm trying to build the fruit ninja type swipe to some of my buttons in Flash CS6 and ActionScript3.

In trying to figure it out this is what I have come up with:
get the coordinates of where the user first put his finger mouse down,
then where we lifted it
see if your button touches any of those coordinates (if yes, execute that button code)
run some kind of animation between the first two coordinates (mouse down, mouse up points)

am I on the right track?

Also, has anyone already done this so that I can look at their code?

Thanks!

1

1 Answers

3
votes

Check out this series on the subject by the great Emanuele Feronato, using the physics library Box2d:

(I couldn't find part 3 but I don't think we're missing anything too important there). Hope this helps!