(AGK version: 108.15)
Submitted: 2013-07-18 01:50:37
Setvirtualresolution(640,480)
ResetTimer()
//Create Four Images, 11 to 14
Dim x[3]=[16,31,16,0]
Dim y[3]=[0,16,31,16]
Swap()
For i=0 to 3
    Drawline(16,16,8,24,0,255,0)
    Drawline(16,16,x[i],y[i],255,255,0)
    Update(0)
    Render()
    GetImage(i+11,0,0,31,31)
    ClearScreen()
Next i
//Create Sprite Frames
id=CreateSprite(11)
For i=11 to 14
    AddSpriteAnimationFrame(id,i)
Next i
//Set Background
SetClearColor(50,50,100)
SetSpritePosition(id,100,100)
//Start Animation
PlaySprite(id,2)
Do
    Print("Frame Count:"+Str(GetSpriteFrameCount(id),0))
    Sync()
    If Timer()>15 Then Exit
Loop
End
Help make AGK better by submitting an example for this command!
(All examples are subject to approval)
Login to post an example of your own.