simple logic question

  • meAsking
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Feb 17, 2004
  • Posts: 38
  • Status: Offline

Post December 5th, 2004, 8:33 pm

MC moves back and forth from side to side. How do i stop it?
I tried for so long, and can't think anymore:
Code: [ Select ]
var movement = 10;
onEnterFrame = function () {

if (_x<=0 || _x>=550) {
movement = -movement;
}
_x -= movement;
};

Thanks
  1. var movement = 10;
  2. onEnterFrame = function () {
  3. if (_x<=0 || _x>=550) {
  4. movement = -movement;
  5. }
  6. _x -= movement;
  7. };
  8. Thanks
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post December 5th, 2004, 8:33 pm

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post December 5th, 2004, 10:03 pm

Code: [ Select ]
delete this.onEnterFrame;
Strong with this one, the sudo is.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 35 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.