-
9
pages
-
English
-
Documents
Description
This is a tutorial on how to simulate various gravity forces on an object in a Flash movie. I am releasing this tutorial freely, for the benefit of the Flash Programming community. Feel free to pass it on to anyone. All I ask is that you keep this document in its original form. If you want to add to it, place your comments or additions at the end of the document, with your name, e-mail address and date and send me a copy. I am writing this tutorial in stages, each stage being a complete working movie. Each next stage will add a few more features to the previous one. This is the way I built the file in the first place, getting one thing to work, then adding a little more… The general outline will be: A. Create an object and get it to move in one direction (i.e. horizontally). B. Get it to bounce off one side of the screen, then two sides. C. Then get it moving vertically as well as horizontally, and bouncing off all sides of the screen. D. Adding gravity. E. Adding friction. F. Adding a variable level of “bounce”. G. Letting you pick up the ball and throw it. OK, let’s start. A. CREATING THE OBJECT AND MOVING IT Here we are just going to create the object and have it move at a steady rate using Action Script alone. 1. Create a new movie. Modify movie to change the background to black and the frame rate to 20. This will make things look pretty smooth. Keep the default size settings of 550x400. 2. Draw a circle, select it, turn it into a movie clip ...
-
Publié par
-
Langue
English