• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Hour 12. Objects and Arrays > Task: Dragging with Trails

Task: Dragging with Trails

In this next example, we'll store a series of locations in an array. As the mouse moves, we'll push the current location onto the array and shift the oldest location off of the array. That way, we'll maintain a list of the 10 most recent positions of the cursor.

We'll use this information to set the locations of 10 movie clips. The result will be a trail of movie clips that follow the cursor around.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint