# Create a file for mp3 files and then play randomly using the sound block on ios

**URL:** <https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745>\
**Category:** Questions about Thunkable X\
**Created:** [January 5, 2018, 10:33pm UTC](https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745 "2018-01-05T22:33:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jong196](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@jong196](https://community.thunkable.com/u/jong196)\
**Post date:** [January 5, 2018, 10:33pm UTC](https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745/1 "2018-01-05T22:33:09Z")

</div>

I am trying to create a file to store mp3 files on ios and I want to use the file as a source for the sound block and play them at random.  
Is this something you will add or is there a way to do it now.  
Many thanks

---

<div class="post-metadata">

**Author:** ![ervarela](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ervarela/32/17136_2.png) [@ervarela](https://community.thunkable.com/u/ervarela)\
**Post date:** [April 6, 2018, 4:03pm UTC](https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745/2 "2018-04-06T16:03:04Z")

</div>

I’m also interested in playing a random sound from a list when a button is clicked. I think I’m close. Can someone offer advice? Currently, this set-up only plays the “Hands Separatly.m4a” sound.

![Random Sound V1 iOS](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/8/986b2add9b2fd4471985f6f0cc71ddba23555cab.png)

 ![Sound1 Source](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/0/d04bed0537c2ab73c3197d7e25e01fe2ddbd3e64.png)

---

<div class="post-metadata">

**Author:** ![ervarela](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ervarela/32/17136_2.png) [@ervarela](https://community.thunkable.com/u/ervarela)\
**Post date:** [April 6, 2018, 8:48pm UTC](https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745/3 "2018-04-06T20:48:04Z")

</div>

Hey I’ve got this working. I thought I’d share a screen shot of the final product for anyone who would like help playing a sound file at random from a list.

 ![14 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/a/8a4f464fcbf5a7b088cc0cbe2dc8f5500fb3a6ce.png)

@jong196 I hope this helps you!  
-Beth

---

<div class="post-metadata">

**Author:** ![jong196](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@jong196](https://community.thunkable.com/u/jong196)\
**Post date:** [April 8, 2018, 6:47pm UTC](https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745/4 "2018-04-08T18:47:26Z")

</div>

Thank you for helping. I have over 3000 files lol in android I use a zip file but that can’t be done here from what I see. Plus all my blocks keep disappearing arrrggjj lol drives me nuts.

---

<div class="post-metadata">

**Author:** ![ervarela](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ervarela/32/17136_2.png) [@ervarela](https://community.thunkable.com/u/ervarela)\
**Post date:** [April 9, 2018, 4:15pm UTC](https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745/5 "2018-04-09T16:15:16Z")

</div>

Ah that makes a lot of sense. Weird that your blocks keep disappearing. I’ve not experienced that. Hope it gets sorted out soon!  
🍻  
-Beth

---

<div class="post-metadata">

**Author:** ![jhowan](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@jhowan](https://community.thunkable.com/u/jhowan)\
**Post date:** [July 4, 2020, 8:11pm UTC](https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745/6 "2020-07-04T20:11:18Z")

</div>

This was hugely helpful for me, thanks!

---

<div class="post-metadata">

**Author:** ![ervarela](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ervarela/32/17136_2.png) [@ervarela](https://community.thunkable.com/u/ervarela)\
**Post date:** [July 4, 2020, 9:27pm UTC](https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745/7 "2020-07-04T21:27:16Z")

</div>

Glad to hear it @jhowan! My app worked great. LMK if you run into any trouble while building yours.  
-Beth

---

<div class="post-metadata">

**Author:** ![shrutishree08059o](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@shrutishree08059o](https://community.thunkable.com/u/shrutishree08059o)\
**Post date:** [December 15, 2020, 3:42am UTC](https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745/8 "2020-12-15T03:42:17Z")

</div>

I am not getting option attach mp3 file in list. mp3 file can only be adding to the from sound1 set source block.  
See this code: [https://x.thunkable.com/projects/5fd8249ed2f8ef00127bad37/67c268e9-4aeb-4654-bf69-75c4b6b1c516/blocks](https://x.thunkable.com/projects/5fd8249ed2f8ef00127bad37/67c268e9-4aeb-4654-bf69-75c4b6b1c516/blocks)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 15, 2020, 4:06am UTC](https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745/9 "2020-12-15T04:06:13Z")

</div>

You can upload a sound file at the bottom of the Design tab components list:

 ![Screen Shot 2020-12-14 at 8.04.37 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/5/85710327e6e645b0df6d5cc80921ed1152207a18.png)

Then, use a text block as the sound source and type in the exact name of the sound file you uploaded.

 ![Screen Shot 2020-12-14 at 8.06.42 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/9/395c0ad65732cbff0c6cdf97d4a61b1c62bc33b8.png)

I was able to get it to work using your blocks but I had to first initialize “app counter” to 1.

---

<div class="post-metadata">

**Author:** ![calebator](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@calebator](https://community.thunkable.com/u/calebator)\
**Post date:** [March 3, 2021, 3:12pm UTC](https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745/10 "2021-03-03T15:12:18Z")

</div>

How do you get the file block to connect to the create list block?

---

<div class="post-metadata">

**Author:** ![calebator](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@calebator](https://community.thunkable.com/u/calebator)\
**Post date:** [March 3, 2021, 3:13pm UTC](https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745/11 "2021-03-03T15:13:17Z")

</div>

nvm i just read all the comments 😉

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:25am UTC](https://community.thunkable.com/t/create-a-file-for-mp3-files-and-then-play-randomly-using-the-sound-block-on-ios/13745/12 "2024-11-08T11:25:06Z")

</div>


