A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [help] object movement

  1. #1
    _One of a Kind_ j.manfogle's Avatar
    Join Date
    Aug 2005
    Location
    Philippines/usa
    Posts
    198

    [help] object movement

    can any one tell me how to make just a plain square move i know

    if (Key.isDown( ))

    but what code do u add to make it move??

    just a stupid Q
    Fogle

  2. #2
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    -super simple
    Code:
    if (Key.isDown(Key.RIGHT)) {
    	_x += 1;
    }
    -harder;

    Code:
    if (Key.isDown(Key.RIGHT)) {
    	x += 1;
    } else {
    	x *= .8;
    }
    _x += x;
    lather yourself up with soap - soap arcade

  3. #3
    _One of a Kind_ j.manfogle's Avatar
    Join Date
    Aug 2005
    Location
    Philippines/usa
    Posts
    198
    ya i know its really simple but i just wanted to be sure i was right!!

    thanks anyways!!
    Fogle

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