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

Making a Slider

You've already learned most of the ActionScript necessary to create a slider. A slider is simply a movie clip that is dragged up and down, or left and right, within a constrained area. Think back to when you first used the startDrag method. This method has several arguments: lockCenter, Left, Right, Top, and Bottom. You can use the Left, Right, Top, and Bottom arguments to constrain the movement of a draggable movie clip, and that's exactly what you need to do to make a slider.

In the following exercise, you will use the startDrag method to create a simple slider. You will constrain the slider to a rectangle defined by the slider's x and y properties.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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