Help needed >_<'

Blitz3D Forums/Blitz3D Beginners Area/Help needed >_<'

Sephiroth(Posted 2003) [#1]
hi,

I made a small program that displays my logo and playes the sound. i checked the manual and the help for any help.

The problem is that if i play this music (by unfortuatly) pressing the S button. Wheni keep hold of it. it will keep playing the same file. resulting in taht lots of music files are begin played.

How can i make the Music play automatticly?

============================================================

Global Player
Global snd

Graphics 800,600,16

SetBuffer BackBuffer()

Player=LoadImage("dragonforce logo.jpg")

snd=LoadSound ("set up.mp3")

While Not KeyHit(1)

Cls

If KeyHit (31) PlaySound snd

DrawImage Player,x,y

Flip
Wend

============================================================


regards,

Vyeyendra Ramnares


jfk EO-11110(Posted 2003) [#2]
Not Shure if it's this what you want:
Global Player 
Global snd 
Global sdown

Graphics 800,600,16 
SetBuffer BackBuffer() 
Player=LoadImage("dragonforce logo.jpg") 
snd=LoadSound ("set up.mp3") 

While Not KeyHit(1) 
 Cls 
 If Keydown (31) 
  if sdown=0
   PlaySound snd 
   sdown=1
  endif
  DrawImage Player,x,y 
 else
  sdown=0
 endif
 Flip 
Wend 


this way the Logo is only drawn if the S Key is pressed and the sound is played initially once.


Paradox7(Posted 2003) [#3]
I think you'll want to use the PlayMusic command
You want to use the PlayMusic command
music = PlayMusic("set up.mp3")

you don't load it up like a sound, doing that line right there, will make the music start playing, so you can if you want, put it before your loop, and it will start playing right away, or put it in your if statment, if a button is pressed, it will play that music, and continue to play it.

or something, look up the command :D docs should explain it better