A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [RESOLVED] [AS2] Move player to Mc

  1. #1
    Senior Wabbit
    Join Date
    Jul 2008
    Location
    Winchester, Uk
    Posts
    215

    resolved [RESOLVED] [AS2] Move player to Mc

    ok so to start I have a var called position.

    I need to move my player to block+position.
    so if position is 3 the player needs to move to
    player._x = block3._x;
    player._y = block3._y+15;

    That would work fine though need some that goes to the current position block ie..

    player._x = "block"+position._x;
    player._y = "block"+position._y+15;


    though no luck any ideas

    Trust my code, and not my english.

  2. #2
    Senior Member
    Join Date
    Jun 2008
    Posts
    549
    Can you upload simple version of your fla?

  3. #3
    Senior Wabbit
    Join Date
    Jul 2008
    Location
    Winchester, Uk
    Posts
    215
    dont see why you need one though will upload any who.

    http://www.hobo-town.com/Flashkit/mo...to%20block.fla

    Trust my code, and not my english.

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    The right syntax would be:
    PHP Code:
    player._x this["block"+position]._x
    if block3 isn't on the same timeline than player, you may have to change the prefix this accordingly - either _parent or else.

    gparis

  5. #5
    Senior Wabbit
    Join Date
    Jul 2008
    Location
    Winchester, Uk
    Posts
    215
    Thank you very much I was so close just missed this :P

    Works a treat will lock the topic

    Trust my code, and not my english.

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