A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: FRICTION, GRAVITY , ETC..

  1. #1
    Senior Member
    Join Date
    Jul 2000
    Posts
    126
    Pretty new to flash, noticed everyone is using this stuff, Like friction gravity, and so on.

    Is there a good back or a list of commands, or more FLA's on this.

    Thanks.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Posts
    588
    There aren't really any pre-built Flash commands to handle this stuff, but most you can just use mathematical formulas to mimic friction, gravity, etc.

    For example, if you want an object to decelerate due to friction, you could set up a "speed" variable and multiply it by a value less than 1:

    speedx = speedx*0.97

    That will slowly reduce the speed of an object. Then, when you apply that speed to an object's location:

    ball._x = ball._x + speedx

    The ball will move by a smaller and smaller distance with each time this script is executed.

    You can find some FLA examples at:

    http://www.philterdesign.com/p2/flashplayground

    under motion studies.

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    126

    Thank YOU

    This site is so much help, anyone that needs to learn anything about information pertaning to this, ITS A GREAT START.

    Thank you phil'ter design and thanks flashers



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center