On 9/5/02 9:05 PM, [EMAIL PROTECTED] wrote: > I'm trying to access snd files (installed into stacks with ResEdit on a Mac) > randomly. > > I tried accessing them using the snd id numbers but it doesn't seem to like > that. Is there any way to access snd files other than to refer to them by the > "sound1" name convention etc..? > > i.e. I have 50 snd files installed and wish to access them at random when hitting > a "PLAY" button... (I'm using the last release...2.4.1 I think)
I'm not sure why you don't want to use the sound names. At any rate, that is the only way HyperCard will play them. Presumably you already know what they are called. If you don't, you can use ResEdit, ResCopy, or the Resource Mover card in the Power Tools stack to see what is in there and what the sounds are named. If they don't have names already, give them names. Once you know what they are, just make a list with one name per line and store it in a field. To get a random sound to play, use: play (any line of fld "mySoundList") Another way -- you could open the stack in MetaCard, which will transfer all the sounds as well, and then look in the Components section of the stack properties. You should see the whole list of sound names there, which you could extract. Then put that list into the HyperCard field for storage. On the other hand, once the stack is in MetaCard, you might just want to keep it there. The same script will work. In MetaCard though, you could store the list as a custom property instead of in a field, if you wanted to. There, I got us back on topic. :) -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com _______________________________________________ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard