Solved

# Continuous x & y co-ordinates

Posted on 2000-04-17
199 Views
On a drag operation, how can I show with continuous feedback, the current x and y co-ordinates of a point within the dragged item?
0
Question by:susannahbond
• 2

LVL 2

Accepted Solution

68k earned 200 total points
ID: 2725482
a movie clip can be "tracked" using the GetProperty method. we can target the movie clip being dragged and set two variables equal to the _x and _y position.

say your movie clip has an instance name of "mc". you can set two variables equal to the x/y like this:

Set Variable "x" = GetProperty("/mc",_x)
Set Variable "y" = GetProperty("/mc",_y)

If you would like a visual example of the coordinates of this movie clip as it is moved, draw two editable text fields on the stage and assign them variable names "x" and "y".

a similar article below describes how you can do this with a draggable movie clip that is attached to the cursor. while it's a tiny bit different, the expressions to obtain movie clip x and y are exactly the same. i should know. i wrote it. ;>)

http://www.macromedia.com/go/14417

hope this helps -

68k
0

Expert Comment

ID: 2726981
0

LVL 2

Expert Comment

ID: 2727113
to chrisb12 -

no, i'm not new to flash. i've been doing it for about 2 years.

68k
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question