Page 1 of 1
Reference sound files
Posted: Sat Mar 19, 2011 3:53 pm
by michelle300
Has anyone tried to refer to a sound file using a variable in IOS? For example:
put the short name of the current card&".wav" into soundtoplay
play specialFolderPath("engine") & "/Audio/soundtoplay"
Doesn't work for me. I would appreciate any help or suggestions. Thanks!
Re: Reference sound files
Posted: Sat Mar 19, 2011 4:08 pm
by Klaus
Hi michelle,
variable names must not be in uotes!
And you need to put parenthesis around the filename.
This will work:
...
put the short name of the current card & ".wav" into soundtoplay
play (specialFolderPath("engine") & "/Audio/" & soundtoplay)
...
Best from gemany
Klaus
Re: Reference sound files
Posted: Sat Mar 19, 2011 4:09 pm
by ctflatt
Klaus:
I was just going to respond to this when your response popped in...
Hilarious!
:T
Re: Reference sound files
Posted: Sat Mar 19, 2011 4:25 pm
by Klaus
Well, no wonder, I'm a couple hours ahead of you

Re: Reference sound files
Posted: Sat Mar 19, 2011 4:42 pm
by michelle300
Thanks Klaus and ctflatt. I had tried a version that didn't use the quotes - because I thought the same thing but was getting errors from LC. I probably just had a typo I didn't notice. It is working perfectly! I really appreciate your help!

Re: Reference sound files
Posted: Sat Mar 19, 2011 4:44 pm
by michelle300
I posted too quickly - I just noticed this part of the comment "put parenthesis around the filename" -- That was it. Thanks again!