A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Saving the Coodinate of a MC

  1. #1
    11 Years Old Boya
    Join Date
    Apr 2004
    Posts
    61

    Saving the Coodinate of a MC

    How do you save the x and y of a MC like in Merlin's Revenge?
    I really need it so player won't start at the beginning again.
    Checkout my site:
    Click HERE
    Checkout my games:
    Oops! No game for now!

  2. #2
    doItLikeThis
    Join Date
    Jan 2004
    Location
    :noitacoL
    Posts
    1,080
    Inside your mc:-
    code:

    onClipEvent(load)
    {
    _root.xpos =0;
    _root.ypos =0;
    }
    onClipEvent(enterFrame)
    {
    _root.xpos = this._x;
    _root.ypos = this._y;
    }



    _root.xpos and _root.ypos are the variables, in which the x and y position of your mc will be stored.
    Last edited by adit_ya_sharma; 09-21-2004 at 01:40 AM.
    -Aditya

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