Skip to main content
Known Participant
December 13, 2007
Question

Looping through 2 arrays and repositioning movieclips

  • December 13, 2007
  • 3 replies
  • 275 views
I have a mad-lib type page that I am trying to put together. There are 27 words that have all been converted to movie clips named word1, word2, etc., that make up my first array. There are 3 layers inside each movie clip: a 'hit' layer, a text layer, and a bg layer. The on mousedown event grabs the hit layer. The second array has 6 items in it called blank1, blank2, etc. I am doing a hitTest so that if one of the words is over the blank it will snap to the blank movie clip x, y position. I am having major difficulty getting the movie clip to snap back to its original position if the hitTest is false. My code is below.


Also, there is a reset button that is supposed to send the words back to their original position but I'm not sure how to do that outside of the for loop.

Thanks!
This topic has been closed for replies.

3 replies

kglad
Community Expert
Community Expert
December 20, 2007
you're welcome.
Known Participant
December 20, 2007
Thanks kglad. That seemed to do the trick.
kglad
Community Expert
Community Expert
December 14, 2007
: