# And or &&?

**URL:** <https://forum.kirupa.com/t/and-or/229245>\
**Category:** Uncategorized\
**Created:** [June 15, 2007, 5:37am UTC](https://forum.kirupa.com/t/and-or/229245 "2007-06-15T05:37:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Takashy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/takashy/32/1985_2.png) [@Takashy](https://forum.kirupa.com/u/Takashy)\
**Post date:** [June 15, 2007, 5:37am UTC](https://forum.kirupa.com/t/and-or/229245/1 "2007-06-15T05:37:19Z")

</div>

Hi there, well, Im not that good at AC so I try to figure out some stuff but it rarely works… lol

Thers my problem. I made a little code and I want it to move my MC when one Variable is 0 and when a key is pressed on the keyboard.

Thers the code…

```
if ((Key.isDown(68)) and (PlayerSpeed, 0)) {
    _root.MyMC._x -= 3;
}

```

the problem is that it does not work. I tryed to put “&&” in the place of “and” but it did not work to. but if I just make it like this

```
if ((Key.isDown(68))) {
    _root.MyMC._x -= 3;
}

```

than it works. The problem is that I need that that other variable to. Its like the “and” stuff does not work but I hav no idea why… 😕

anyone could please help me with that? ^^;
