graphics 800,600,0,2 playerImage=loadanimImage("ship_idle.bmp",80,70,0,4) type UnitObject ;just some name for your type so that this code snippet works field frame field image end type player1.unitobject=new unitobject player1\image=playerimage player1\frame=0 repeat cls player1\frame=(player1\frame +1) mod 4 ;frames go from 0-3, meaning there are 4 frames in total with the first being frame 0 and the last being frame 3 drawimage player1\image,400,300,player1\frame flip until keydown(1) freeimage playerImage delete each unitobject end
should get you started.