General Discussions

Using an array for music in Blitz Basic – MTecknology

MTecknology

Member

Posts: 13
From:
Registered: 08-18-2003
Aight, I am trying to use an array to unload music files.
I added a post already but don't want to add confusiont o that one.
I think this will explain it nicely.

If KeyHit(5)
For I=0 To 9
StopChannel(backgroundmusic(I))
Next
backgroundmusic(4) = PlayMusic("6. Californication.MP3")
EndIf

I want to use an array for a loop, because I want smaller code, so the user doesn't need to suffer the ability to change music.
I have ten music files.

------------------
You will find me where the light don't shine, where the people are silently friendly, where we are the most intelligent, and where all can live down under, until our trip to heaven.

InsanePoet

Member

Posts: 638
From: Vermont, USA
Registered: 03-12-2003
Or what u can do is instead spare the memory and load the music files on demand, of course, you'll have some drawbacks, like loading time in the middle of the program running.

I dunno, just giving u an option.

------------------
"I find myself a desire which no experience in this world can satisfy, the most probable explanation is that I was made for another world!"
-C. S. Lewis


midnight-fire.org

MTecknology

Member

Posts: 13
From:
Registered: 08-18-2003
yea, i think i got it, I kinda wish i could load the file sop i could ionclude it in my exe, but its working decsent (bigger code)

------------------
You will find me where the light don't shine, where the people are silently friendly, where we are the most intelligent, and where all can live down under, until our trip to heaven.