A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Move Symbol in The Direction of a Point

  1. #1
    Junior Member
    Join Date
    Jun 2012

    Question Move Symbol in The Direction of a Point

    I have a Bullet symbol on my stage, but I want to move it towards a Point at a given speed. Is there any way of doing this (using ActionScript 3)?

  2. #2
    There is way for everything in AS3 You can use script like this:

    Actionscript Code:
    var speed:int = 10;


    function myEnterFrame(event:Event) {

    while(Bullet_mc.x != Point_mc.x){

    Bullet_mc.x = Bullet_mc.x + speed;



    Scotty does know how to Fla-make cool ads.

    http://flamake.net - this Ads will Fla-make you crazy. Find your cheap flash banners and see the best commercials around the world.

  3. #3
    Dignitary rynoe's Avatar
    Join Date
    Jan 2003
    Remember the distance equation.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center