This content has been marked as final. Show 3 replies
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'.
"rossmurphy88" <firstname.lastname@example.org> wrote in message
>I have an unknown number of movie clips tat are added dynamically. I can
> them fine but i want to add them so they appear off stage at a random x, y
> and then slide in and ease up to another random spot on the screen. So
> time the movie is loaded it looks lik someone has thrown a bunch of photos
> on a table and they slide and spread to random locations and ease to a
> Anyone have any clues? i have found a number of tutorials but would like
> extra help/explanations.
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 :)
Thanks for that guys, it's given me a better understanding of which methods to use. I'll post up my progress.