3 Replies Latest reply on Apr 26, 2012 7:26 AM by Ned Murphy

    Array and moving a object???

    LukeElChul Level 1

      I want so when i make worker it moves to a object called Garrison.




      import mx.transitions.Tween;

      import mx.transitions.easing.*;



      workers = new Array();




      function CreateWorker(){

                worker = _root.attachMovie("worker","worker" +tag, tag,{_x:55,_y:55})

      worker.gotoFunction = GarrisonPoint();




      function GarrisonPoint(){

                var t1:Tween = new Tween(this, "_x", None.easeNone, this._x, _root.Garrison, 10, true);

          var t2:Tween = new Tween(this, "_y", None.easeNone, this._y, _root.Garrison, 10, true);