# Touching screen "reset" animation with mobile

**URL:** <https://phaser.discourse.group/t/touching-screen-reset-animation-with-mobile/9391>\
**Category:** Phaser 2 / CE\
**Created:** [April 25, 2021, 10:08am UTC](https://phaser.discourse.group/t/touching-screen-reset-animation-with-mobile/9391 "2021-04-25T10:08:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aurelienazerty](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/aurelienazerty/32/5082_2.png) [@Aurelienazerty](https://phaser.discourse.group/u/Aurelienazerty)\
**Post date:** [April 25, 2021, 10:08am UTC](https://phaser.discourse.group/t/touching-screen-reset-animation-with-mobile/9391/1 "2021-04-25T10:08:39Z")

</div>

Hi all,

I modify the invader exemple [here](https://www.team-azerty.com/html/1erAvril/covid-19/), and I wanted to make it mobile friendly.

I add “button” :  
boutonGauche = game.add.button(0, game.world.height - 60, ‘bouton-gauche’, bougerGauche);  
boutonDroite = game.add.button(game.world.width - 64, game.world.height - 60, ‘bouton-droit’, bougerDroite);  
boutonFeu = game.add.button(game.world.centerX - 32, game.world.height - 60, ‘bouton-feu’, fireBullet);

With this fonction :  
function bougerGauche() {  
player.x -= 5;  
}  
function bougerDroite() {  
player.x += 5;  
}

But nothing append, the animation restart each time I press on screen.

Can you help me please ?

Script is here : [https://www.team-azerty.com/html/1erAvril/covid-19/js/invaders-reloaded.js](https://www.team-azerty.com/html/1erAvril/covid-19/js/invaders-reloaded.js)

---

<div class="post-metadata">

**Author:** ![Aurelienazerty](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/aurelienazerty/32/5082_2.png) [@Aurelienazerty](https://phaser.discourse.group/u/Aurelienazerty)\
**Post date:** [July 21, 2021, 12:03pm UTC](https://phaser.discourse.group/t/touching-screen-reset-animation-with-mobile/9391/2 "2021-07-21T12:03:09Z")

</div>

Hi all, could you help me ? I don’t understand why there is this behavior

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [July 21, 2021, 3:42pm UTC](https://phaser.discourse.group/t/touching-screen-reset-animation-with-mobile/9391/3 "2021-07-21T15:42:03Z")

</div>

Problem is

```
game.input.onDown.add(startFullScreen, this);

```

Maybe you want `addOnce()`?

---

<div class="post-metadata">

**Author:** ![Aurelienazerty](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/aurelienazerty/32/5082_2.png) [@Aurelienazerty](https://phaser.discourse.group/u/Aurelienazerty)\
**Post date:** [July 21, 2021, 9:39pm UTC](https://phaser.discourse.group/t/touching-screen-reset-animation-with-mobile/9391/4 "2021-07-21T21:39:03Z")

</div>

Change done, without effect.
