2 Replies Latest reply on May 11, 2010 11:36 AM by GordonSmith

    the physics behind actionscript

    rhgtv

      I'm a student at Academy of Art University and for my final project for my Physics for Artist class I am illustrating the physics behind a ball bounching using Fl. I found a useful tutorialkirupa.com but my teacher says, "There's a small problem with the equations: the speed term should be negative, if downward is positive." and,wants to know "Also, can you tell me how the program knows when to switch between the two equations?" I looked at the AS, which I really am not that familiar with, and cant really get how it is using the laws of physics to make the motion realistic. Does anyone know of a source that explains how the developers at flash have integrated the laws of physics in the code syntax? Or even some other tutorials of sample files that create this motion in flash and explain/ illustrate the laws of physics behind it? Any help would be much appreciated-this stuff is hard to find!,/p>

        • 1. Re: the physics behind actionscript
          GordonSmith Level 4

          > Does anyone know of a source that explains how the developers at flash have integrated the laws of physics in the code syntax?

           

          > I looked at the AS, which I really am not that familiar with, and cant really get how it is using the laws of physics to make the motion realistic.

           

          I looked at the kirupa link that you gave and it has the relevant physics equation for the position of an object with constant acceleration (e.g., under gravity near the earth's surface) and its translation into ActionScript,

           

          this.y = initialPos + .5*gravity*(timer * timer);

           

          Can you explain more about what you don't understand? Is it the physics equation or the ActionScript code?

           

          Gordon Smith

          Adobe Flex SDK Team

          • 2. Re: the physics behind actionscript
            GordonSmith Level 4

            Just to be clear... there is no physics "behind" ActionScript. ActionScript is just an ordinary programming language that, like any programming language, can do mathematical calculations, including ones that simulate physical processes. ActionScript doesn't "know" anything about physics, but if you know the right physics equation you can compute it in ActionScript.

             

            Gordon Smith

            Adobe Flex SDK Team