Solved

# Continuous x & y co-ordinates

Posted on 2000-04-17
Medium Priority
206 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 400 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

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
###### Suggested Courses
Course of the Month6 days, 23 hours left to enroll