Solved

Continuous x & y co-ordinates

Posted on 2000-04-17
3
197 Views
Last Modified: 2010-05-18
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
Comment
Question by:susannahbond
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
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

by:chrisb12
ID: 2726981
68k your new to Flash but your writing code for macromedia?
0
 
LVL 2

Expert Comment

by:68k
ID: 2727113
to chrisb12 -

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

68k
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now