3 Replies Latest reply on Oct 16, 2007 4:46 PM by rossmurphy88

    Animating dynamic move clips.

    rossmurphy88
      I have an unknown number of movie clips tat are added dynamically. I can add them fine but i want to add them so they appear off stage at a random x, y pos and then slide in and ease up to another random spot on the screen. So each time the movie is loaded it looks lik someone has thrown a bunch of photos out on a table and they slide and spread to random locations and ease to a stop. Anyone have any clues? i have found a number of tutorials but would like some extra help/explanations.

      Cheers.
        • 1. Re: Animating dynamic move clips.
          Level 7
          very basically, it should be something like -
          once a MC is loaded place it randomly offstage, and then using the Tween
          class move it to a random location on stage.
          for further information, read the help files about 'random' and 'tween'.
          good luck,
          eRez
          www.allofme.com


          "rossmurphy88" <webforumsuser@macromedia.com> wrote in message
          news:ff2d0c$531$1@forums.macromedia.com...
          >I have an unknown number of movie clips tat are added dynamically. I can
          >add
          > them fine but i want to add them so they appear off stage at a random x, y
          > pos
          > and then slide in and ease up to another random spot on the screen. So
          > each
          > time the movie is loaded it looks lik someone has thrown a bunch of photos
          > out
          > on a table and they slide and spread to random locations and ease to a
          > stop.
          > Anyone have any clues? i have found a number of tutorials but would like
          > some
          > extra help/explanations.
          >
          > Cheers.
          >

          • 2. Re: Animating dynamic move clips.
            clbeech Level 3
            I think that I would create a 'holder' clip that maintains the methods to derive the motions, as well as the on handlers to (I assume) select and display the chosen photo image. Then I'd load the image thumbnails dynamically into each holder on attachment to the Stage (code contained within the holder), and set an id or index number from an array of the images that had been previously bought into the system (like from a directory reader via php), so that each can be referenced, by the associated holder methods.

            As far as the motion is concerned, you just need to 'pick' your two points randomly, and then use the Tween class to move the MC from one point to another, tweening both the x and y values, you can also make some random adjustments to the time of either tween (x,y) so that they're different, to make it appear to travel in curve.

            Just some starting thoughts :)
            • 3. Re: Animating dynamic move clips.
              rossmurphy88 Level 1
              Thanks for that guys, it's given me a better understanding of which methods to use. I'll post up my progress.