Alan MacDougall wrote:


I'm about to begin on a project for work where a user has the ability to select areas on a map by clicking and dragging his mouse over and area. When the person is finished they will let go of the mouse button and a nice little square will appear on the map where they
have selected.


Just use onMouseDown and onMouseUp handlers for the movieclip that contains your map. Record the _xmouse and _ymouse at each event. Those are the diametric corners of your new selection.

Oh, and if you want a box to appear and resize in sync with the user's movements, have the onMouseDown handler create an onMouseMove listener, and resize the box each time that event fires. Then onMouseUp doesn't need to draw the box; it can just remove the onMouseMove listener and leave the box at its last drawn position.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to