Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9197831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:09:23+00:00 2026-06-17T22:09:23+00:00

Is it possible to move one object towards another that might be moving? I

  • 0

Is it possible to move one object towards another that might be moving?

I can only put x,y coords as moving parameters as far as I can see(?)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T22:09:25+00:00Added an answer on June 17, 2026 at 10:09 pm

    without using greensock you could do the following as a basic example:

    addEventListener(Event.ENTER_FRAME, loop);
    
    function loop(e:Event):void{
        if(object1.x<object2.x){
            object2.x-=5;
        }else{
            object2.x+=5;
        }
    
        if(object1.y<object2.y){
            object2.y-=5;
        }else{
            object2.y+=5;
        }
    }
    

    Greensock animation requires a duration meaning the tween will come to an end at some point. There is a dynamicprops plugin but that also comes to an end eventually so this have to be done manually for any long amount of time.

    Implementing basic friction and/or gravity will add to the realism (multiplying the ‘5’ number by a friction amount for example).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to move quickly from one place in code to another where
Is it possible to have the seekbar move only when the thumb is moved.
I'm trying to map one object to another but the object is quite complex.
I have a problem with detours. Detours, as you all know, can only move
I'm working with the QuickBox2D library, and I'm trying to move one object to
Is it not possible to move between pages in the canvas on facebook? I'm
I'm curious if it is possible to move the written and fully working project
I was wondering if it is possible to move all rows of data from
I would like to ask if it is possible to copy/move all the objects
I using jquery sorting ( http://jqueryui.com/demos/sortable/ ). Is it possible to sort (move list)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.