using the following jumpTo script as a guide how do I write an if statement for a function that will basically ask “if the movieclip is at position 3 stay there, otherwise jumpTo position 2”?
var bg1x = new Array(0, -1280, -1014, 0);
function jumpTobg1X(number) {
gradientNav_mc.newX = bg1x[number];
}
I have tried a bunch of if/else statements but I can’t get it working. I can’t figure out how to write it properly. I tried something like this:
myButton.onRollOver = function() {
if (gradientNav_mc.newX = bg1x[ 3 ]) {
jumpTobg1X(3);
} else {
jumpTobg1X(2);
}
};
I guess I’m going to need a listener as well to get the location??? how do i do that?
thanks.