Hi all, just made this intro scene for AppGameKit games and thought I'd share it with anyone who wants to use it... media attached. Just call the function before the rest of your code, it tidies up after itself and does the dishes:
// AGK Intro
function AGK_intro()
for i=1 to 31
is$ = str(i)
if i < 10
is$ = "0"+is$
endif
loadImage(i,"Anim\intro00"+is$+".png")
next
createSprite(1,1)
for i = 1 to 31
AddSpriteAnimationFrame(1, i)
next
setSpriteOffset(1, getImageWidth(1)/2, getImageHeight(1)/2)
setSpritePositionByOffset(1, getVirtualWidth()/2, getVirtualHeight()/2)
f = 1
SetSpriteFrame(1,f)
sync()
done=0
while done<>1
time# = timer()
if time# > animtime#
f = f + 1
if f > 31
f = 1
done=1
endif
SetSpriteFrame(1,f)
animtime# = time# + 0.03
endif
sync()
if f = 16 then sleep(1500)
endwhile
deleteSprite(1)
for i=1 to 31
deleteImage(i)
next
endfunction
If you like it buy me a beer
I like beer