i = 0; function onEnterFrame() { if ((_xmouse>0) and (_xmouse<242) and ...) { nextFrame(); trace(i++); }