Ok, now we know how to make the character move. But we dont want it to move out of the screen, do we? No! Lets give the character this code:
onClipEvent(enterFrame) {
if (_y>550) {
_y=550;
}
if (_y<0) {
_y=0;
}
if (_x>400) {
_x=400;
}
if (_x<0) {
_x=0;
}
}
Kay, now your character shouldn't be albe to move outside the window!
But, what if you want to make the character move to another place when it walks over a hotspot? No problem! Just go to the next page!