Username: Password:

how to animate a sprite



in the sprite's script, these functions should animate it.

// - - - code - - -

code nodeopen()
sprite.colset(me, 1)
threadstart(me, nextframe(), - 100)
endcode

code nodeclose()
sprite.colset(me, 1)
endcode

code nextframe()
local col, theversion

col = sprite.colget(me) + 1
if col > 6
col = 1
endif
sprite.colset(me, col)

threadstart(me, nextframe(), - 100)
endcode