i've fixed your Font Scroller but you have another Problem,
the CanvasGadget() and the Box() can't be moved in Z-Order into the background. and your Command: Delay (25) let flicker the box.
copy the code and run it. all is fine but if you uncomment Line 79 you will see
IncludeFile "fmodex(short).pbi"
Enumeration
#Mainform
#Wave
#spectrum
#win
EndEnumeration
Global fmodsystem.i, Channel.i
i.i
j.i
Max.i
Position.i
YCurrentWave.i
YOldWave.i
EP_InitFXLib()
InitSprite()
MP_Graphics3D (1024,768,0,1)
CanvasGadget(#spectrum, 240, 150, 540, 400)
FMOD_System_Create(@fmodsystem)
FMOD_System_Init(fmodsystem, 32, #FMOD_INIT_NORMAL, 0)
File.s = "Gunther.mp3"
Dim WaveArray.f(1024)
FMOD_System_CreateStream(fmodsystem, @File, #FMOD_SOFTWARE, 0, @sound)
FMOD_System_PlaySound(fmodsystem, #FMOD_CHANNEL_FREE, sound, 0, @channel)
EP_Init2DStars(200,7,1.3,0,0,1024,768)
EP_2DStarsColor(1,RGB(255,0,0))
EP_FastRasterBar(0,RGB(40,140,250),50)
EP_FastRasterBar(1,RGB(135,135,135),50)
;////////////////////////////////////
;- SINUS FONT
;////////////////////////////////////
EP_CatchFont32(bmpfont,?font, ?endfont)
EP_SetScrollText(bmpfont," yep ! .............that's all good !! ")
EP_Create32Scroll(bmpfont, 0, 0,240, 0,1030)
EP_SetScroll32Speed(bmpfont, 5)
EP_SetSinScroll32(bmpfont, 2, 2, 30, -1)
;----MainLoop---------------------------------------------------------------
Repeat
event=WindowEvent()
MP_RenderBegin()
FMOD_Channel_GetWaveData(Channel, WaveArray(), 1024, 0)
StartDrawing(CanvasOutput(#spectrum))
DrawingMode(#PB_2DDrawing_AllChannels)
Box(0, 0, 1026, 500,RGB(0, 0, 0))
DrawingMode(#PB_2DDrawing_Transparent)
For i=1 To 1024
YOldWave=(WaveArray(i-1)+1)*250
YCurrentWave=(WaveArray(i)+1)*250
LineXY(i-1,YOldWave,i,YCurrentWave,RGB(0,200,50))
LineXY(i-1,YOldWave+1,i,YCurrentWave+1,RGB(0,90,50))
LineXY(i-1,YOldWave-1,i,YCurrentWave-1,RGB(0,110,50))
Next
StopDrawing()
;Delay(25)
EP_2DStarsDraw()
EP_2DStarsDegree(b.f) ; RANDOM DEGREE
b.f - 0.1
EP_DisplayRasterBar(0,30)
EP_DisplayRasterBar(1,740)
EP_Move32Scroll(0)
MP_Render2D ()
MP_RenderSprite ()
MP_RenderEnd()
MP_Flip ()
Until GetAsyncKeyState_(#VK_ESCAPE)
FMOD_Channel_Stop(Channel)
FMOD_System_Release(fmodsystem)
End
DataSection
font:
IncludeBinary "2.bmp"
endfont:
EndDataSection