# Newbie? concerning logic operator -=

**URL:** <https://forum.kirupa.com/t/newbie-concerning-logic-operator/163123>\
**Category:** flash\
**Created:** [September 20, 2005, 1:04am UTC](https://forum.kirupa.com/t/newbie-concerning-logic-operator/163123 "2005-09-20T01:04:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dr\_red](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@dr\_red](https://forum.kirupa.com/u/dr_red)\
**Post date:** [September 20, 2005, 1:04am UTC](https://forum.kirupa.com/t/newbie-concerning-logic-operator/163123/1 "2005-09-20T01:04:17Z")

</div>

Newbie? on logic operator -=  
Hey all,  
I’m new to actionscript and am doing a tutorial in a book that moves a car from one end of the screen to the next by buttons.  
When you release a button it moves the car 10 pixels more down the X axis.

The code confuses me and I want to understand it Please Help!

Here is the code:

// stop the cars traveling  
stop();  
// callback for onPress event on ‘back’ button  
back\_btn.onPress = function() {  
// move my car -10 pix  
myCar\_mc.\_x -= 10;  
};  
// callback for onPress event on ‘forward’ button  
forward\_btn.onPress = function() {  
// move myCar +10  
myCar\_mc.\_x += 10;  
};

Why does the - sign and + sign appear before the = instead of after?  
Is this a logic operator(-= or +=)?  
Why doesn’t putting the - sign or + sign after the = work?

Thank you so much for your time and help!  
-Drred  
:pleased:
