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

Chapter 14. Using ActionScript Behaviors > Using the Start and Stop Dragging Be...

Using the Start and Stop Dragging Behaviors

The Start and Stop Dragging Movieclip Behaviors are a novel way to give Flash visitors the chance to interact with your site. The behaviors can be attached to objects on the screen, when the visitor clicks and drags; the object is dragged along for the ride. The ideas here are endless. For example, you could create a house with furniture (each piece of furniture being a movie clip), and let the visitor rearrange the furniture. Or, you could create a puzzle, and let the visitors assemble the puzzle. To begin the process, you will need a Flash document that contains one or more movie clips (for dragging).

Use the Start and Stop Dragging Behaviors

1.
Select the layer to contain the movie clip or clips.

2.
Drag the movie clips from the Library onto the Stage.

3.
Enter a unique instance name for each movie clip.

4.
Select one of the movie clips.

5.
Click the Add (+) button in the Behaviors panel, point to Movieclip, and then click Start Dragging Movieclip.

6.
Select the unique instance name for the movie clip.

7.
Click OK.

See Also

See Chapter 6Importing Graphics” on page 175 for more information on importing graphics into Flash to be used with the Start and Stop Dragging Behaviors.

8.
Click the Event list arrow, and then change the event that triggers the behavior to On Press.

9.
Leave the movie clip selected.

10.
Click the Add (+) button in the Behaviors panel, point to Movieclip, and then click Stop Dragging Movieclip.

11.
Click OK.

12.
Click the Event list arrow, and then change the event that triggers the behavior to On Release.

Repeat steps 4 through 12 until all of the movie clips have the Start and Stop Dragging Movieclip Behaviors attached.

13.
Click the Control menu, and then click Test Movie.

Flash displays the movie clip.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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