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

Lesson 10. Drag-and-Drop Interactions > Creating Drag-and-Drop Targets

Creating Drag-and-Drop Targets

Drag and drop gets a lot more meaningful when users have a target on which to drop the dragged objects. Whether you are building an online shopping cart or learning media, targets provide a way for users to trigger events by manipulating onscreen objects so that they interact with each other.

In this task, you will create drop targets for the monsters. In addition, you will set up a test to determine whether a user dropped the monster on the correct target. Along the way, you will learn two new actions: You will use the hitTest() action to determine whether a monster was released over its target, and you will use the trace() action to make Macromedia Flash generate some feedback to make sure that hitTest() actually worked. Once you verify it worked, you'll remove the trace() action and add real code to create the desired behaviors.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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