(AGK version: 108.16)
Submitted: 2013-08-08 10:01:19
Setvirtualresolution(640,480)
ResetTimer()
//Create an image
swap()
SetPrintSize(28)
SetPrintColor(255,255,0)
Print("G")
render()
GetImage(1,0,0,32,32)
//Create a sprite with the image
CreateSprite(1,1)
Do
    SetSpritePosition(1,Random(0,600),Random(0,400))
    Sync()
    Sleep(250)
    If Timer()>10 Then Exit
Loop
End
(AGK version: 108.18)
Submitted: 2013-08-23 03:00:29
rem
rem AGK Application 1.08B18
rem MR 23.08.2013 Screen Wave

SetDisplayAspect( 4.0/3.0 )

dim i[100]
dim s[100]

MainLoop()
end

function MainLoop()

    sync()
    spr=loadsprite("screen.png")  //<- any background image
    setspritesize(spr,100,100)
    drawsprite(spr)
    MakeWave()
    deletesprite(spr)

    w#=0

    do
     print("Hello Wave")
     print(screenfps())

     DoWave(w#)

     w#=w#+360.0/60.0
     if w#>360.0 then w#=w#-360.0

     if getpointerpressed()=1 then exit

     Sync()
    loop

    FreeWave()

endfunction

function MakeWave()

    for y=0 to 99
     i[y]=GetImage( 0, y,getvirtualwidth(), 1.0 )
     s[y]=createsprite(i[y])
     setspritesize(s[y],getvirtualwidth(),1.5)
     setspriteposition(s[y],0,y)
     setspritedepth(s[y],0)
    next

endfunction

function DoWave(w#)

    for y=0 to 99
     setspriteposition(s[y],cos(w#),y+sin(w#)*4.0)
     w#=w#+360.0/100.0
    next

endfunction

function FreeWave()

    for y=0 to 99
     deletesprite(s[y])
     s[y]=0
     deleteimage(i[y])
     i[y]=0
    next

endfunction
(AGK version: 108.24)
Submitted: 2015-02-15 06:18:04
// set window properties
SetWindowTitle( "sprites" )
SetWindowSize( 1024, 768, 0 )

// set display properties
SetVirtualResolution( 1024, 768 )

_White  = MakeColor(255,255,255)
_Blue   = MakeColor(0,0,175)
_Yellow = MakeColor(175,175,0)
_Green  = MakeColor(0,175,0)
_Red    = MakeCOlor(175,0,0)

Render()

DrawEllipse(128, 128, 128, 128, _White, _White, 1) 
Render()
blue   = GetImage(0,0,128,128)
Yellow = GetImage(128,0,128,128)
Green  = GetImage(0,128,128,128)
red    = GetImage(128,128,128,128)

ClearScreen()

_Sprite(blue, blue, 0,0,100, 0,0,175,255)
_Sprite(yellow, yellow,150,0,100, 175,175,0,255)
_Sprite(green, green, 300,0,100, 0,175,0,255)
_Sprite(red, red, 450,0,100, 175,0,0,255)


SaveImage(blue, "blue.png")
SaveImage(Yellow, "yellow.png")
SaveImage(Green, "green.png")
SaveImage(Red, "red.png")

SetClearColor(75,75,75)

do 		
	print(chr(10)+chr(10)+chr(10)+"Images are Saved in the App directory.")
	
	Sync()
loop

function _Sprite(num, img, x#, y#, size#,  Cr, Cg, Cb, Ca)
	CreateSprite(num, img)
	SetSpritePosition(num, x#, y#)
	SetSpriteColor(num, Cr, Cg, Cb, Ca)
	setSpriteSize(num, size#, size#)
Endfunction
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.