PDA

View Full Version : flip horizontal - scaleX



amexudo
July 26th, 2009, 05:44 AM
Hello,
I am developing a fishing game and I have inside my fla file a movieclip of a pirate ship, one of the bonuses of the game.
In certain parts of the game I have to flip the ship horizontally because it depends on the player that he belongs. He can be on the left side or right side of the screen.
I have read that to flip a movieclip horizontally the command is:

mc.scaleX *= -1;
In fact, this command worked for me with a static movieclip that I drew.
But with the pirate ship, this line of command makes it disappear. When I remove the line, the ship is in the right place and behaves as it has to behave but is turning to the opposite side.
Does anyone know about this problem? Does it have to do with the fact that the movieclip contains animations?
Another solution that I've tried is to flip everything but because there are a lot of keyframes and layers, it is impossible to simply click on modify->flip horizontal. The ship moves with tweens inside the movieclip, so I would have to rebuild all the animations.
Thanks for the help!

regbolD
July 26th, 2009, 06:05 AM
maybe your mc is on x = 0 and registration point an the left and when you flip it, it goes outside of the screen if you get what I mean... or something like that :D

amexudo
July 26th, 2009, 06:14 AM
Exactly!
Thanks for the help. He was so far that I couldn't see the movieclip even if I maximized the screen.
Thank you very much.