Solved

Continuous x & y co-ordinates

Posted on 2000-04-17
3
199 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Failed download 57 563
free photo watermark software 5 84
What is needed to center a flash image to the center of the page? 4 100
You Tube Videos not playing 9 123
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

770 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