1 Reply Latest reply on Aug 14, 2006 4:01 PM by crazyjoemilan

    Make object fall when released?

      I want an object (ElementFe_mc) to fall to a table top (_y = 412.4) when released.
      I thought this would be simple, but have been frustrated...here's what I've tried...
        • 1. Make object fall when released?
          crazyjoemilan Level 2
          if you're trying to create an effect of an object falling, you can go about this another way. Here's how I would do it...

          Make a new movieclip, and call the instance helpys_mc. Make four keyframes

          var InitialYPlacement = ElementFe_mc._y
          var fallDistance = 412.4 - InitialYPlacement / 10 //the number 10 is how many steps it will take to fall.
          //nothin, unless you make it a bit more fun.
          ElementFe_mc._y = InitialYPlacement + fallDistance
          if (ElementFe_mc._y >= 412.4) {
          else {

          now on the button's AS, write:

          onRelease() {

          To create a much more effective falling effect, you can simulate the object speeding up as it goes along. (this can be done a number of ways).

          Maybe I answered the wrong question, but I hope this helps :)