?
юзая переменные:
if keydown(57) then state=1-state
if state
cy=cy+1
if cy>graphicsheight()/4 then cy=graphicsheight()/4 else cameraviewport cam,0,cy,graphicswidth(),graphicsheight()-cy*2
else
cy=cy-1
if cy<0 then cy=0 else cameraviewport cam,0,cy,graphicswidth(),graphicsheight()-cy*2
endif
писалось в браузере, поетому ХЗ