mercredi 30 décembre 2015

AS3- Trying to flip a MovieClip horizontally, but it's children won't flip properly?

There is a level one MovieClip that contains a player. There are a separate MovieClip that is contained inside the player MovieClip which is the "arms" for the player. The player flips horizontally, but the MovieClip children such as the 'arms" 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