Is This Right

Hey can somebody chek this code out, for some reason it has no syntax errrors but it does not make my character(Sonic) move.
This Code is in the actions frame on my Properties Layer Below that layer is the layer with sonic on it.

right now im just worried about making him move.

/////Moving left And Right/////
if (Key.isDown(Key.RIGHT)) {
if (_root.Sonic.Xspeed<30) {
_root.Sonic.Xspeed += 3;
}
_root.Sonic.Right = true;
} else if (Key.isDown(Key.LEFT)) {
if (_root.Sonic.Xspeed<30) {
_root.Sonic.Xspeed -= 3;
}
_root.Sonic.Right = false;
} else {
/////Friction/////
if (_root.Sonic.Rolling=false) {
_root.Sonic.Xspeed *= 0.7;
} else if (_root.Sonic.Rolling == true) {
_root.Sonic.Xspeed *= 0.9;
}
}
/////Where To Be/////
x=_root.Sonic._x+_root.Sonic.Xspeed
y=_root.Sonic._y+_root.Sonic.Zspeed
_root.Sonic._x=x
_root.Sonic._y=y