(AGK version: 108.15)
Submitted: 2013-07-17 14:31:11
Setvirtualresolution(640,480)
ResetTimer()
//Create Two Images, 11 and 12
swap()
Drawline(0,0,15,15,255,255,0)
Update(0)
Render()
Drawline(0,15,15,0,255,255,0)
Update(0)
Render()
GetImage(11,0,0,15,15)
ClearScreen()
Drawline(8,0,8,15,255,255,0)
Update(0)
Render()
Drawline(0,8,15,8,255,255,0)
Update(0)
Render()
GetImage(12,0,0,15,15)
ClearScreen()
//Create Sprite Frames
id=CreateSprite(11)
AddSpriteAnimationFrame(id,11)
AddSpriteAnimationFrame(id,12)
//Set Background
SetClearColor(50,50,100)
SetSpritePosition(id,100,100)
//Start Animation
PlaySprite(id,3)

AddVirtualButton(1,480,420,80)
SetVirtualButtonText(1,"Start")
AddVirtualButton(2,580,420,80)
SetVirtualButtonText(2,"Stop")

Do
    If GetVirtualButtonPressed(1) Then PlaySprite(id,3)
    If GetVirtualButtonPressed(2) Then StopSprite(id)
    Sync()
    If Timer()>18 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.