Help Me I Am Going Crazy!

hey friends

i am trying to make a game similar to diner dash on flash

but there seems to be some problems.

in some code on the frames does not seem to work as expected.

the flash seems to be skippin some code.

#include “mc_tween2.as”

var flip:Boolean=false;
t1.onRelease=function(){
trace(jenny._x+":"+jenny._y);
moveTo(281,206);
}

t2.onRelease=function(){
moveTo(531,206);
}

t3.onRelease=function(){
moveTo(281,326);
}

t4.onRelease=function(){
moveTo(531,326);
}

checkPos=function(posx:Number,posy:Number){
if((posx==281&&posy==206)||(posx==531&&posy==206)||(posx==281&&posy==326)||(posx==531&&posy==326)){
jenny.gotoAndStop(“jennyfrontstill”);
}
}

moveTo=function(posx:Number,posy:Number){
var curx=Math.round(jenny._x);
var cury=Math.round(jenny._y);
posx=Math.round(posx);
posy=Math.round(posy);
trace(curx+":"+cury+";"+posx+":"+posy);
if(curx==posx&&cury==posy){
jenny.gotoAndStop(“jennyfrontstill”);
trace(“a”);
return;
}

if(cury==posy){
    trace("b");
    jenny.gotoAndPlay("jennyside");
    if(curx>posx){
        if(jenny._xscale>0){
            trace(jenny._xscale);
            jenny._xscale*=-1;
        }
    }else if(jenny._xscale<0)
        jenny._xscale*=-1;
    jenny.xSlideTo(posx,.7,"linear",0,function(){});
}else if(curx==406){
    trace("c");
    if(cury>posy)
        jenny.gotoAndPlay("jennyback");
    else
        [U]**jenny.gotoAndPlay("jennyfront");//This code is skipping randomly**[/U]
    jenny.ySlideTo(posy,.7,"linear",0,function(){moveTo(posx,posy);});
}else{
    trace("d "+jenny._x+":"+curx);
    jenny.gotoAndPlay("jennyside");
    if(curx>406){
        if(jenny._xscale>0)
            jenny._xscale*=-1;
    }else if(jenny._xscale<0)
        jenny._xscale*=-1;
        
    jenny.xSlideTo(406,.7,"linear",0,function(){moveTo(posx,posy);});
}
trace("end");

}

this.onEnterFrame=function(){
checkPos(jenny._x,jenny._y);
}

Please tell what i am doing wrong