Multi frame sprite question

Post Reply
Operator
Posts: 138
Joined: Mon May 06, 2013 5:52 am

Multi frame sprite question

Post by Operator »

Why do multi frame sprites need at least
an empty (loop: goto loop) structure to work?

Code: Select all

REM Sprite multi frame test

SPRITE "kn" LOAD "Examples/9. Sprites/knight6.png",6,1
SPRITE "kn" AT 40,40 SCALE 1
SPRITE "kn" DELAY 0.1
SPRITE "kn" SHOW
SPRITE "kn" LOOP

'sprite will only loop with this loop (?)
'if you comment out, then just first frame
'is shown and program finishes
LOOP:
GOTO LOOP

'sprite will only loop for 1 second (?)
'comment out to test
'FOR i = 1 TO 10
'  PAUSE 0.1
'NEXT i

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Multi frame sprite question

Post by Mr. Kibernetik »

Multiframe sprite is animating only while program is working.

Operator
Posts: 138
Joined: Mon May 06, 2013 5:52 am

Re: Multi frame sprite question

Post by Operator »

OK, thanks for confirming.
(I didn't understand why my minimal
snippet didn't work till I added a loop)

Post Reply