Wierd if & else

Ok, this is really wierd, or I’m just stupid. Either way, I need help…

I have a movieclip (ball) with a button inside. by clicking on the button, I want to be able to swich the balls y-position between two global values (_global.ballNorth & _global.ballSouth)

This is how I tried to solve it, but it didn’t work out…

Actions for “root-frame”:

_global.ballNorth = 10;
_global.ballSouth = 100;

Actions for button inside ball:

on (release) {
if (_root.ball._y=ballNorth) {
_root.ball._y = ballSouth;
} else {
_root.ball._y = ballNorth;
}
}

When I test the movie the balls y-pos is 10. Then I click on the button inside the ball, and the ball moves to y=100. So far so good.
But it won’t move back to y=10 when I click on the button again!

I use Flash MX 2004 on Win XP SP1, so please tell me, am I stupid or is it a bug? :q:
Help! :hr:

I’m attaching the file in case anyone don’t understand what I mean…

Greetings
Kalliban

wow! I was looking through my old posts and found this, my first thread. How rude of me not to say: “Yes, it works great, and thank you for the help guys!”

Me be sorry
Me also be threaddigging
Me be sorry again. :slight_smile:

not a problem dude. When I saw the notice in my inbox, I was like wasn’t this a long time ago? haha! anyways, nice to know it worked! now finally I can sleep well :wink: