PDA

View Full Version : Constrain a MC to rect? - Please Help


solidsnake
03-22-2001, 09:39 PM
Hi all, this may sound stupid but can someone please tell me how i can make an movieclip instance follow the mouse but yet it is constrained to a rect? so when the mouse is out of the rect area the MC doesn't follow anymore. Any comments or sugestions would be greatly appreciated, tia.
heres an example nav i'm trying to do:
http://phenomenon.org/intense/

Cheers

Jesse
03-22-2001, 11:30 PM
startDrag ("target", true, 100, 100, 400, 300);

Where 'target' is the instance name of your draggable clip. And the numbers, in order are

Left Bound
Tope Bound
Right Bound
Bottom Bound

The bounds are measured in pixels from the tope left hand corner of the stage.

Cheers

Jesse

solidsnake
03-23-2001, 06:32 PM
Thanks again Jesse :) u seem to know alot of flash, can u recommend any good actionscripting books for beginners to intermediate like myself? thnx.

Cheers

Jesse
03-23-2001, 11:51 PM
Well 8 weeks ago I buoght 2 books from Amazon.com so that I could read them and tell you people what I think about them. Only problem is they [b]still aint here. I could write my own book in 8 weeks for God's sake!
[end rant]

Cheers

Jesse