The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.36 / 5.00 33,851 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 12,195 ViewsHey. I'm updating an old project from Flash 6, AS 1.0 to Flash 8, AS 2.0.
When i change it in the publish settings and test it, some things do not work. I managed to fix most of them, but i can't fix this:
onEnterFrame = function () { P1Rotate();P2Rotate();};
function P2Rotate() {
if ((player1._x > player2._x) && (_root.Player2._xscale > 0)) {
_root.Player2._xscale *= -1;
} else if ((player1._x < player2._x) && (_root.Player2._xscale < 0)) {
_root.Player2._xscale *= -1;
}
}
function P1Rotate() {
if ((player2._x > player1._x) && (_root.Player1._xscale > 0)) {
_root.Player1._xscale *= -1;
} else if ((player2._x < player1._x) && (_root.Player1._xscale < 0)) {
_root.Player1._xscale *= -1;
}
}
It works fine in the old project but when i update it doesn't do anything. I guess i may be using outdated syntax or deprecated code, can anyone help? Thanks!
THE CAKE IS A LIE
are you just trying to make the character face the other way?
Ah nevermind, it was a dumb mistake, the instance names are case sensitive, and i typed them in different cases. :P
Yes, the functions make sure, that two characters always face each other. (i'm making a fighting game)
So anyway, case closed.
THE CAKE IS A LIE