Actions in Button symbols are referenced to the timeline, that’s why the whole thing moves. :-\
There are three options:
Use the instance name of your Button instead of this:
[AS]on (keyPress “<Left>”) {
instanceName._x -= 2;
}
on (keyPress “<Right>”) {
instanceName._x += 2;
}
on (keyPress “<Up>”) {
instanceName._y -= 2;
}
on (keyPress “<Down>”) {
instanceName._y += 2;
}[/AS]
Use a MovieClip symbol instead of a Button.
Put your code in the Frame Actions.
[AS]instanceName.onKeyDown = function() {
this._x += (Key.isDown(39)-Key.isDown(37))*2;
this._y += (Key.isDown(40)-Key.isDown(38))*2;
};
Key.addListener(instanceName);[/AS]
By the way, welcome to kirupa forum!! =)