PDA

View Full Version : hi guys i need ur help again :)


raghfrost
02-16-2002, 01:24 AM
i cant seem to snap or even drag my object to my target

my obj is to drag this objet and when it is near the target it should snap on it :)

on (press) {
btn.startDrag();
}
on (release) {
if (eval(_droptarget) != target) {
btn._x = 200;
btn._y = 100;
} else {
btn_x = rabbi._x;
btn_y = rabbi._y;
target = "_root.pasture";
}
trace ("btn_y = "+100);
trace ("btn_x = "+200);
stopDrag ();
}

this is the scrip i got from the flash refrence :)

raghfrost
02-16-2002, 02:19 AM
:confused:

pixelwit
02-16-2002, 07:09 AM
Droptarget returns a string in "slash notation" meaning not "_root.pasture". Probably something more like this "/pasture".

Try using hitTest. It's the Flash5 way to do things.

Hope it helps,

-PiXELWiT
http://www.pixelwit.com

raghfrost
02-16-2002, 11:21 AM
amm it still cant work.

i cant even drag the damn thing

Billy T
02-16-2002, 02:35 PM
see attached

raghfrost
02-16-2002, 07:23 PM
Billy T ur simply the best man

Ricod
02-18-2002, 08:28 AM
rahgfrost, may I remind u of the forum rules ? A thread title should describe its content. Stuff like 'Can't get it to work' or something is pretty useless.

Sckz
02-21-2002, 09:16 PM
Hi raghfrost,

Maybe this answer it too stupid for you but does you MC the right instance name?

Grtz,

Sckz