I don't know why, but no matter what i do, my Squirreler (frogger-style game with a squirrel as the main character) game squirrel sprite is constantly flipping itself.

I can't find were the hole in the code is, please help!
Not as urgent:Mr.skull (grim reaper character my friend created for the game) is supposed to move back and forth and block Squirreler from getting to the top of the screen, but refuses to move.
cls
lifec=3
leveln=1
gosub levelsetup
do
cls
text 15,440,"x"+str$(lifec)
` text 0,0,str$(mousex() )+", "+str$(mousey() )
if sprite y(1)<0 then gosub winlevel
` up
if upkey()=1
` if sprite flipped(1)=1 then flip sprite 1
sprite 1,sprite x(1),sprite y(1)-3,5
endif
` left
if leftkey()=1
sprite 1,sprite x(1)-3,sprite y(1),10
endif
` right
if rightkey()=1
sprite 1,sprite x(1)+3,sprite y(1),6
endif
if sprite hit(1,0) then lifec=lifec-1 : sprite 1,screen width()-40,screen height()/2,5
if lifec=0 then goto endgame
gosub mrskullai
loop
goto remenu
levelsetup:
sprite 1,430,250,5
sprite 2,200,1,8
sprite 3,1,440,9
return
winlevel:
cls
text 300,300,"ROUND CLEARED!!!"
leveln=leveln+1
sleep 2000
gosub levelsetup
return
endgame:
sprite 1,sprite x(1),sprite y(1),7
play sound 1
text 300,300,"YOU LOSE!!!"
sleep 3000
stop sound 1
delete sprite 1 : delete sprite 2 : delete sprite 3
goto relook
mrskullai:
if sprite x(1)>sprite x(2)
sprite 2,sprite x(2)+(leveln*2),sprite y(2),8
endif
if sprite x(1)<sprite x(2)
sprite 2,sprite x(2)-(leveln*2),sprite y(2),8
endif
if sprite x(2)>screen width() then sprite 2,1,sprite y(2),8 : mirror sprite 1
if sprite x(2)<screen width() then sprite 2,screen width()-(sprite width(2)+1),sprite y(2),8 : mirror sprite 1
return
Notes:
lifec= number of lives remaining
leveln=level number (currently has no actual usage)
relook=label at the start of the program
sprite 1=main sprite
sprite 2=enemy
sprite 3=life icon
image 5=squirrel up
image 6=squirrel right
image 7=squirrel death
image 8="mrskull"
image 9=life icon
image 10=squirrel left
"Your taunts are ill-advised templar."-Dark Templar, Starcraft