Drag 'n' drop question

hi im making this thing and i want to make this thing move by dragging it (i can do that already) but i want it so you go to the next keyframe and the object will be in the same place as you draged it.

any help??

                       Flash monkey:egg:

maybe you could get the x and y-position and save it into a variable in your first frame, like this:

[AS]on (release) {
stopDrag();
_root.varx = _root.yourmc._x;
_root.vary = _root.yourmc._y;
nextFrame();
}
[/AS]

then you can read the variables in the second frame and change the x and y-position of your dragged object

[AS]
_root.yourmc._x; = _root.varx
_root.yourmc._y; = _root.vary
[/AS]

thanks ill try it now

wow it works but i wanted so you go to frame 2 and then you take off the script but when i take off the script from frame 2 it just goes back to it’s normal location can you help me?

ps. sorry if dont make sense i rushed for time sorry

you take off the script?

GOD IM NOT THAT DUMB!!!

i have tried that but when i take off the script the object goes back to the starting off possition when you go to the next frame

no, i don’t know what that means… do you delete the script? why?

i got a object in two frames but in the first frame i leave evrything the same but in the second frame i take of the actionscript from the object and it goes back to it starting place

if you still dont understand ask me for the fla

without the actionscript it goes back to its place, of course
but why do you take off the actionscript

o poo poo i forgot to tell you i want it so you cannot drag it no more once your in frame 2

now i understand, well, you have to leave the script, but you’re using 2 different frames, so why don’t you just delete the startdrag action in your button

becouse when you take that bit off it goes back to it’s original place

o did you say button doesit matter if its not a button?

mm, could you give me the fla

i could give you this fla i just made up and you could edit it?

press space to drop it

i gave your boxes the instance “box”, you forgot the second part of the AS in your frame, and I have deleted the actions on your mc in the second frame. I also added the AS to your arrow, so you don’t have to drop it first…

thanks it worked

you’re welcome