Examples - Protovision/moonbase GitHub Wiki

Slideshow

function moonbase.main()
    local files, images
    files = { "city.jpg", "beach.jpg", "mountains.jpg", "space.jpg" }
    images = {}
    for i = 1, #files, 1 do
        images[i] = moonbase.archive.image( files[i] )
    end
    i = 1
    while true do
        images[i]:drawBackground()
        moonbase.yield( 3000 )
        i = i + 1
        if i > #images then
            i = 1
        end
    end
end