7 Replies Latest reply on Jun 15, 2013 3:14 PM by kglad

    Store a Movie Clips x and y coordinates for use in a further frame.


      Hey, i'm making a turn based game where when your character hits an object it takes you to a battle scene. Once the battle is over you return to the previous frame with the character in the same spot it was when it hit the object, but the object isn't there anymore. I'm able to make it so the object isn't there anymore, but my character goes back to the beggining position of the game instead of where it hit the object.


      Here is what I have on the character.


      onClipEvent (load) {

                speed = 5;


      onClipEvent (enterFrame) {

                          this._x = _root.xa;

                          this._y = _root.ya;


      xa and ya are 2 dynamic texts i have off the stage that just hold the numbers.


      The code in the frame is:



      xa = _root.xa;

      ya = _root.ya;


      And the code I have in the battle frame is the same.


      I know that this shouldn't work, but i'm not sure what I could do to make it work. Any suggestions?