vendredi 25 décembre 2015

as3- Trying to flip horizontal but flips in an odd way instead?

There is a level one class that contains a player and it's arms. The arms are a separate movieclip that is contained inside the player movieclip. The player flips horizontally, but the movieclip children inside the player will not flip horizontally.

In the level one class I put:

if (mouseX > player.x)
        {
            player.scaleX = 1;
            crosshair.x = mouseX;
        }
        else if (mouseX < player.x)
        {
            player.scaleX = -1;
            crosshair.x = mouseX;
        }

I added a download to my files because it's a bit hard to explain. The code is located in "PageOne.as".

http://ift.tt/1PnemDD

Aucun commentaire:

Enregistrer un commentaire