I did this a while ago
// Project: loader
// Created: 2017-12-02
// show all errors
SetErrorMode(2)
#constant width=1024
#constant height=768
// set window properties
SetWindowTitle( "loader" )
SetWindowSize( width, height, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 0,0,1,1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
global title as string = "PROGRAM - ARGONAUGHTS" // Change this for the title of the app
global titledata as string ="DATA - ARGODATA"
// Setup your title screen
global spectrum_titlespr as integer
global spectrum_title_on as integer = 0
spectrum_titlespr = createsprite(LoadImage("test.png"))
SetSpritePosition(spectrum_titlespr,width,50)
SetSpriteSize(spectrum_titlespr, width-100, height-100)
// Setup the text display for what its loading
global program as integer
program = CreateText("") : SetTextSize(program,20) : SetTextColor(program,0,0,0,255)
global red : red= MakeColor(255,0,0)
global cyan : cyan= MakeColor(0,100,255)
global yellow : yellow = MakeColor(255,255,0)
global blue :blue = MakeColor(0,0,255)
global black : black= MakeColor(0,0,0)
global white :white= makecolor(255,255,255)
spectrumload()
// Game loop start
do
Print( ScreenFPS() )
Sync()
loop
function spectrumload()
//spectrum_load_data(yellow, blue, 300,-1,2)
// setspritesize(spectrum_titleimg,width-100,height-100)
// spectrum_load_data(cyan, cyan, 50,-1,1)
spectrum_load_data(red, cyan, 50,0,1)
spectrum_load_data(yellow, blue, 10,-1,2)
SetTextString(program, title)
spectrum_load_data(cyan, cyan, 50,-1,1)
spectrum_load_data(red, cyan, 50,0,1)
spectrum_load_data(yellow, blue, 50,-1,2)
spectrum_load_data(cyan, cyan, 50,-1,1)
spectrum_load_data(red, cyan, 50,0,1)
spectrum_load_data(yellow, blue, 10,-1,2)
SetTextString(program, titledata)
spectrum_load_data(cyan, cyan, 20,-1,1)
spectrum_load_data(red, cyan, 50,0,1)
SetTextString(program, "")
spectrum_title_on=1
spectrum_load_data(yellow, blue, 200,-1,2)
spectrum_title_on=2
spectrum_load_data(cyan, cyan, 50,-1,1)
spectrum_load_data(red, cyan, 50,0,1)
spectrum_load_data(yellow, blue, 50,-1,2)
spectrum_load_data(cyan, cyan, 50,-1,1)
spectrum_load_data(red, cyan, 50,0,1)
spectrum_load_data(yellow, blue, 300,-1,2)
DeleteSprite(spectrum_titlespr)
endfunction
// LoadType = 1 = Steady read
// 2 = Frantic read
function spectrum_load_data(barcol1, barcol2, delay, framesync, loadtype)
if loadtype = 1
rand1=random(10,20)
rand2=random(10,20)
endif
line=50
for delays=0 to delay
if loadtype = 2
rand1=random(10,20)
rand2=random(10,20)
endif
for a=-500 to height step rand1+rand2
drawbox(0,a+framesync,width,a+rand1+framesync, barcol1,barcol1,barcol1,barcol1,1)
drawbox(0,a+rand1+framesync,width,a+rand1+rand2+framesync, barcol2, barcol2, barcol2, barcol2,1)
next
if framesync=>0 then inc framesync
if spectrum_title_on = 1
Render2DFront()
SetSpritePosition(spectrum_titlespr, 50, 50)
Render2DBack()
DrawBox(50,line,width-50,height-50,black,black,black,black,1)
line = line+5
if line>height-50 then line = height-50
else
if spectrum_title_on = 2
Render2DFront()
SetSpritePosition(spectrum_titlespr,50,50)
Render2DBack()
else
Render2DBack()
DrawBox(50,50,width-50,height-50,white,white,white,white,1)
SetTextPosition(program,60,60)
Render2DFront()
endif
endif
print(ScreenFPS())
//Render2DFront()
//Render2DFront()
// Render2DBack()
sync()
// DeleteSprite(spectrum_titlespr)
next
endfunction
May be not what you after