actionScript works in flash player 6 but not in 8 (Need Help)

Hi guys
i have littel problem with ActionScript
i was looking for “Springs effect” i found some thing wich was easy to edit
when i edited it as i want i change the flash Player Verson to 8 but it was not work
i think it is somthing new in action for flash 8 maybe some thing has been changed
this is the script

onClipEvent (load) {
 tx = _root.x_txt;
 k = .3;
 damp = .8;
}
onClipEvent (enterFrame) {
 tx = _root.x_txt;
 ax = (tx-_x)*k;
 vx += ax;
 vx *= damp;
 _x += vx;
}

wating for help
thanx