Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

How to Drag with Bounds or Boundaries in Flash AS3 Tutorial Free fla file

Loading...

Sign in or sign up now!
7,451
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Dec 2, 2008

Download Free Flash fla file here http://www.developphp.com

In this free Flash ActionScript 3 fla file download tutorial you can learn how to drag within set bounds or boundaries. You can easily set the edges or area of drag in Flash. Download the free fla file to get at all of the code and see how Adam takes a rectangle and uses it as the drag bounds.

The way he coded it dynamically will allow you to place any size objects for the boundaries rectangle, and any size object for the draggable movieclip. No need to even adjust numbers. Simply put what you want in place, give it the correct instance name, and you are all set. The math equations he has in it take care of the differences in values to give perfect dynamic bounds results in simple code.

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (6)

Sign In or Sign Up now to post a comment!
  • How about the case, when you have a map and you dont want the edge of the map to leave the boundaries?I mean when the size of the map is larger than the area where it is visible?

  • lol

  • what is the process for adding more photos? i want to add like 20 photos. how do i alter the code to make this work?? i know i can change the instance name but ive tried everything with the code and nothing. plz help and thnx.

  • lol -> we just do it that way

    By the way, when you release the mouse key outside of the boundary box or the flash application itself, the drag doesn't stop. You might want to fix that. Overall - 4/5 =D

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more