realbasic-games
[Top] [All Lists]

Re: Sound Compile errors

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Sound Compile errors
From: Fargo Holiday <fargo at rpgportland dot com>
Date: Wed, 13 Sep 2006 20:02:03 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <1DC3F182-18EE-4E95-B23C-98A6A5EF489E at rushsoftware dot com dot au>
Hi,
I'm amongst the newbiest here, but wouldn't it be better to actually bring the file in programatically?
Like so:
dim sf As FolderItem
 dim sobj As Sound

 sf = GetFolderItem("test.wav")
 if sf <> Nil Then
   if sf.Exists Then
     sobj = sf.OpenAsSound
     sobj.Play
   end if
 end if

Other than that, you should be able to drag the file to your Project panel, and it should create the sound object for you. So, test.wav becomes the sound object "test" and you can use test.play . I don't know if that's 100% reliable, and it certainly seems the less flexible route, but it should work. I can't test in RB2005, but RB2006 handles it just fine.

Thanks,
Fargo

Martin Fitzgibbons wrote:
I am teaching a class using RealBASIC 2005 Release 4 (although the same problem appears in 2006).

We are having trouble adding sounds to the game projects they are working on.

This used to be a simple case of drag the sound to the project and use sound.play

We have tried .wav, .mp3 etc

Any suggestions as to what is going wrong?

Martin Fitzgibbons
Kiama High
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>




--No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.3/446 - Release Date: 9/12/2006


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>