Hey I'm currently creating a game in Adobe Flash Professional CS6. I have a character, with an instance name of "alien". So far, I've only been able to code my game so that the alien can't go off the top or left sides of the stage. I can't figure out how to code it so that the alien can't go off the bottom or right sides of the stage. The coding I have is as follows:
if((alien.x) < (alien.width/2)){
alien.x += 10;
}
if((alien.y) < (alien.width/2)){
alien.y += 10;
}
Thank you for your time.