This content has been marked as final. Show 5 replies
Do you have any kind of background in physics? You will likely need one to get something working along these lines, and while you might get lucky, I don't think anyone is going to solve this for you.... It can get fairly complicated and your description isn't clear enough as to the intent of how things travel and what kind of action you intend to determine when they are thrown.
Every frame you will need to record the x and y of the drag's current location. You can then figure out the velocity in the x and y direction by subtracting the x,y of the last frame from the current value, finally swap the new x,y into the old x,y, and repeat.
Don't do anything with the velocities until the user let's go. Then use them to move the item.
As NedWebs points out the devil IS in the details. There are so many ways to go with this, but the basic idea is what is used in general. If you are serious about this kind of stuff I recommend Keith Peters' book, "Making Things Move!" He has a great simple approach to understanding things like velocity, acceleration, throw and gravity, friction, etc.
Ok thankyou very much for helping me, I had no idea it would be so hard , on a related issue is there a way of going to a particular frame when an object falls inside a particular area?
Look into the hitTest() method of movieclips
I second the recommendation on Keith Peters' book. I return to that book for stuff like this all the time.