<div dir="ltr">Thank you Leonel,<div><br></div><div>The problem I found was Alice does not allow us to treat the sound file as a data type but as a resource.</div><div>Your suggestion about having different objects from different classes looks interesting. I will give it a try.</div><div>Please let me know if you have any success on your end.</div><div><br></div><div>Thanks,</div><div>Nalini</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 31, 2014 at 11:14 PM, Leonel Morales <span dir="ltr">&lt;<a href="mailto:litomd@gmail.com" target="_blank">litomd@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have a preliminary version in which I explored different options.<br>
None of them worked other than the nested if, which I tried to avoid<br>
as much as possible.<br>
<br>
You can download it here:<br>
<br>
<a href="http://ingenieriasimple.com/alice/LetArray.a3p" target="_blank">http://ingenieriasimple.com/alice/LetArray.a3p</a><br>
<br>
I found no way to put different sound files into an array.<br>
<br>
But there is an option... You can insert 5, or as many as needed,<br>
different objects of different classes, into the scene, made them<br>
invisible, build a PlaySound method for each different class, put them<br>
all in an array and call them as needed.<br>
<br>
I personally haven&#39;t tried this solution as it looks complicated. What<br>
I am trying to do now is to export the same class into different class<br>
files and then edit the files to change the type. No success yet.<br>
<br>
As soon  as I have a new version I will let you know.<br>
<br>
CC you directly because list moderation these days could be slow :)<br>
<br>
All the best for 2015!<br>
<br>
Leonel<br>
<br>
2014-12-28 23:35 GMT-06:00, Nalini Ujre &lt;<a href="mailto:nalinir54@gmail.com">nalinir54@gmail.com</a>&gt;:<br>
&gt; Hello all,<br>
&gt;<br>
&gt; I have a project where the audio needs to be played depending on certain<br>
&gt; conditions. For example, if the &quot;c&quot; key is pressed, it should play a<br>
&gt; certain sound. I want to know if there is a way to store the names of the<br>
&gt; audio files in an array and then use it as required instead of using the if<br>
&gt; conditional statement each time. There are about 15 audio files that are<br>
&gt; required in this project.<br>
&gt;<br>
&gt; I am using Alice 3.1<br>
&gt;<br>
&gt; Thank you<br>
&gt; Nalini<br>
&gt;<br>
</blockquote></div><br></div>