# Can someone tell me what im doing wrong?

**URL:** <https://forum.kirupa.com/t/can-someone-tell-me-what-im-doing-wrong/122018>\
**Category:** Uncategorized\
**Created:** [September 9, 2004, 4:04pm UTC](https://forum.kirupa.com/t/can-someone-tell-me-what-im-doing-wrong/122018 "2004-09-09T16:04:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pheonix3372001](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@Pheonix3372001](https://forum.kirupa.com/u/Pheonix3372001)\
**Post date:** [September 9, 2004, 4:04pm UTC](https://forum.kirupa.com/t/can-someone-tell-me-what-im-doing-wrong/122018/1 "2004-09-09T16:04:20Z")

</div>

hello,

ok in flash mx 2004 i am trying to setup an action script on frame one that will manipulate an object forward and back but stopping at a certain pixel so it doesnt keep going off the screen.

This is the code that i have and it moves the object but doesnt stop the object at the certain pixel.

the screen resolution is 550x400

stop();  
if (car.\_x \< 458){  
go.onPress = function(){  
car.\_x+=10;  
onEnterFrame = function(){  
car.\_x+=10;  
}  
}  
} else if(car.\_x == 458){  
go.onPress = function(){  
car.\_x+=0;  
onEnterFrame = function(){  
car.\_x+=0;  
}  
}  
}

if you can please let me know what i am doing wrong.

thanks

Albert
