[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Continuous x & y co-ordinates

Posted on 2000-04-17
3
Medium Priority
?
204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

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

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
Suggested Courses

649 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