Collision help

my code look’s like this

onClipEvent (enterFrame) {
if (this.hitTest (_root.obj2))
{
_root.gotoAndStop (2);
}
if (_root.dot = 1)
{
this._x += 10;
}
if (_root.dot = 2)
{
this._x -= 10;
}
}

it’s pastet on a movieClip which is called obj1 and in frame 1 i wrote

stop ();
var dot = 1;

and in frame 2

stop ();
var dot = 1;

please help

regards
Gonzolo The Evil Destroyer Of Worlds