I have code like
on (press) {
startDrag(screen);
}
on (release) {
stopDrag();
x_value1=_root.screen._x;
y_value1=_root.screen._y;
trace(x_value1);
trace(y_value1);
}
But I found after dragging, x_value1 and y_value1 are always the initial value. So what is the right way to record the position then? thanks in advance !
Actually, I want to record different position of movieclip when the button is clicked.
There are two buttons as front, back. I would like to when the front button is clicked. Drag the movieclip and record its position, then when I pressed the front button again, the position should still be there.
So I have something for the movieclip like
on (press) {
startDrag(_root.screen);
}
When I click the front_btn, I write the text and drag it by mouse. And after I click the front_btn again, the output textfield should still stay there.
What’s with the textfields !? Two minutes ago it was a screen !
What is the back button supposed to do ?
What should be written inside the two boxes ?
Which text should you drag ?
…
Please provide the FLA so I can have a look and maybe understand what you mean.
You can try to input data when different button is clicked, e.g when front is clicked, or when back is clicked. You will see that the position of the screen is the same no matter what I dragged.
i don’t understand why you want to have a front and a back button, but have a look at my example. maybe this is in the lines of what you are looking for.
Thanks indeed for your code. That is much helpful! I do appreciate. Although it is not exactly the same, it gives me idea about that. Thanks again! Regards!