1 Reply Latest reply on May 10, 2006 4:22 PM by jthereliable

    how do i move objects in an assigned order?

    hutch_bug
      I need help urgently!

      I have 14 bricks, and want each one to fall down the screen in a particular order.

      I'm guessing I'll need to use an array, but I am really new to actionscript and need basic instructions on what to do...

      thanks

      (this is my fla so far, the user has to match the puzzle on the right as the bricks fall in an assigned order)

      Using Flash MX

        • 1. Re: how do i move objects in an assigned order?
          jthereliable
          (in order as in.. right after the other or right after they land...)
          this is right after the other (with a given time to drop the next)
          if they are all seperate boxes, do something like this:
          on the onClipEvent(load), put an order, like drop=1, drop=2,drop=3
          onClipEvent(load)
          {
          drop=2
          time=0
          }
          onClipEvent(enterFrame)
          {
          time++
          if(time>drop*12) //12 frames before dropping the second one
          {
          **your drop code
          }
          }

          if you want them as duplicated, do this:
          duplicatedmovie=[the duplicate movieclip code]
          duplicatedmovie.drop=1

          and in the movieclip that you are duplicating, add this:
          onClipEvent(load)
          {
          time=0
          }
          onClipEvent(enterFrame)
          {
          time++
          if(time>drop*12) //12 frames before dropping the second one
          {
          **your drop code
          }
          }
          basically the same code except that the drop was set in different areas.

          I hope it helps, but I'm not sure if it was what you were looking for.