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.
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?
GIOREKH 2 months ago
lol
clapdeeclap 2 years ago
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.
AyRestaurant 2 years ago
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
Skeddels 3 years ago