PDA

View Full Version : constrain to rectangle, but....


davido
04-07-2003, 04:31 AM
I'm a 'newbie'. Thanks for this fantastic site, all of you.
I'm trying to do a simple drag, and I've set up my code as Jesse has suggested in her tutorial (at least it seems to look the same), but something is still amiss. I found the same question in these forums by using the search, but the advice seems to be the same.... ?

I set this actionscript for an invisible button that I placed in a movie file. Now I can drag the movie file, but I can drag it all over the screen - not constrained to the coordinates (30, 65, 670, 255). I know it must be a simple problem. Thanks for your help.
-davido

on (press) {
startDrag (this, true, 30, 65, 670, 255);
}
on (release) {
stopDrag ();
}

Billy T
04-07-2003, 05:28 AM
should work fine

post the file

davido
04-07-2003, 08:38 AM
thanks for you help! As I said, I'm a newbie - when you say 'post the file', what kind of file format should I be posting? I tried to see what others were sending, but my computer won't open the attachments others send - or at least, doesn't know what kind of application to open them with.
Thanks for your patience!

Billy T
04-07-2003, 01:36 PM
zip up the fla and then attach the zip to your post

if you're on a mac and the files download as .php files, just drag em on to stuffit expander

cheers

davido
04-07-2003, 07:00 PM
thank you, sir.

Here's the .zip.....

Billy T
04-07-2003, 11:41 PM
well the co-ordinates were wrong

see attached

have a read of the flash manual regarding the startDrag method

cheers

davido
04-08-2003, 03:12 AM
Thank you so much! Its resolved now. I've got to study that book more before I post here. So I learned two lessons today.

Thanks again.
davido