×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Mouse position by Lingo relative to a dragable object

Mouse position by Lingo relative to a dragable object

Mouse position by Lingo relative to a dragable object

(OP)

Hello:

I have a huge problem, at least for me. So far I've been using this little code(Buddy API) to locate the cursor on a specific location on the stage, over an object:

on enterFrame me
 baPlaceCursor(x+the stageleft , y+the stagetop)
and

But now I got really complicated, why? I need to do the same, but prior to the "scene" in which the mouse "automatically" jump from one position to another, the user has the preference of moving the object, which before was static, therefore easy to "pre-define" the coordinates with that little code.

To drag the objects I'm using the MULTIPLE SPRITE DRAG. Then the user can go to a different "scenes" in which the cursor will "automatically" move over to the new position over the object, and if the user wants to change the position of the object again, then the mouse will jump over the object's new position again, and then.... well basically the same.

I guess I have to put the coordinates of the object when it's moved in a global variable and then update the "mouse position code" by retrieving that information. BUT!!! I do not know how to do it.

Any Clues, help, comments, suggestion, examples, scripts, whatever will be highly appreciated.

Thanks !!!!!

RE: Mouse position by Lingo relative to a dragable object

"I guess I have to put the coordinates of the object when it's moved in a global variable and then update the "mouse position code" by retrieving that information."

You've answered your own question! Just use locH and locV to get the position of the sprite and assign the value to global variables.

Kenneth Kawamoto
www.materiaprima.co.uk

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close