none
I need help! RRS feed

  • Question

  • I been trying for some hours to get music play in small basic. I making a minecraft and the pictures in the directory im access work (show up on screen when i call them) but when I sound.play("C:\Program Files\SBCraft\assets\sound.wav") I doesnt play. HELP!!!!!!!!!!!

    I 14 and love to help out you!


    Thursday, June 13, 2013 12:43 AM

Answers

  • ardiezc

    I used your snippet, commented out lines that I didn't use and changed variable "song" to to an mp3 file that I had on my computer.  This works.  I would suggest that you take a sound file that you can double-click and that plays and put that link in the variable "song".  That should then play.

    'image="C:\Program Files\SBCraft\assets\head.png"
     song="C:\Program Files (X86)\Boxee\Media\test_sound.mp3"
     GraphicsWindow.Show()
     'GraphicsWindow.DrawImage(image,0,0)
     Sound.Playandwait(song)


    JR

    Thursday, June 13, 2013 9:20 AM
    Answerer

All replies

  • ardiezc,

    Put in GraphicsWindow.show().  The issue is that the program is closing before the sound plays.  So, it would be:

    GraphicsWindow.Show()

    sound.play("C:\Program Files\SBCraft\assets\sound.wav")


    JR

    Thursday, June 13, 2013 1:21 AM
    Answerer
  • I did that. no luck yet.

    image="C:\Program Files\SBCraft\assets\head.png"
    song="C:\Program Files\SBCraft\assets\sound.mp3"
    GraphicsWindow.Show()
    GraphicsWindow.DrawImage(image,0,0)
    Sound.Playandwait(song)


    I 14 and love to help out you!

    Thursday, June 13, 2013 1:23 AM
  • At my Computer, SmallBasic and any SB-programs can't use files in "C:\Program Files\". Perhaps you should try to use another directory.

    Mit freundlichen Grüßen Timo Greetings Timo

    Thursday, June 13, 2013 1:35 AM
  • ardiezc

    I used your snippet, commented out lines that I didn't use and changed variable "song" to to an mp3 file that I had on my computer.  This works.  I would suggest that you take a sound file that you can double-click and that plays and put that link in the variable "song".  That should then play.

    'image="C:\Program Files\SBCraft\assets\head.png"
     song="C:\Program Files (X86)\Boxee\Media\test_sound.mp3"
     GraphicsWindow.Show()
     'GraphicsWindow.DrawImage(image,0,0)
     Sound.Playandwait(song)


    JR

    Thursday, June 13, 2013 9:20 AM
    Answerer
  • None work... Is it because I am not the Administrator???

    I 14 and love to help out you!

    Sunday, June 16, 2013 6:54 PM