::::URGENT::::how to prevent looping

i have a m/c (one) that moves with scripting. inside of that m/c is another m/c (two). two has a stop action on the first blank keyframe, and a stop action on 5th keyframe (ten frames) total.
i can’t, for the life of me figger a way to play two when one reaches a specific _x without looping.

//in two

onClipEvent(load) {
x = _root.one._x;
}
onClipEvent(enterFrame){
if(x=100){
this.gotoAndPlay(2);
}
}
two seems to be looping i assume because the statement is always true. however i want two to play once (through 10 frames) then i would like to ‘reset’ the statement so if x=100 again it will play through two again.

any help would be greatly appreciated.

onClipEvent(load) {
x = _root.one._x;
}
onClipEvent(enterFrame){
if(x=100){
this.gotoAndPlay(2);
} else {
stop();
}

???

I may be wrong makes sense to me though.

Well for one you will need a stop() action on the frame you want it to stop at.

And for two, when comparing to see if a variable equals something you must use the boolean value ==.

onClipEvent(load) {
x = _root.one._x;
}
onClipEvent(enterFrame){
if(x == 100){
this.gotoAndPlay(2);
}