Skip to first unread message

morty...@gmail.com

unread,
Mar 24, 2014, 5:21:11 PM3/24/14
to mitappinv...@googlegroups.com
Hi everyone! I want to make an app where when you click a button a differente mp3 file starts playing. Is that possible with MIT2? Thank you!

SteveJG

unread,
Mar 24, 2014, 6:19:59 PM3/24/14
to mitappinv...@googlegroups.com
Part of this at this link:   https://sites.google.com/site/middleschoolandroid/home/app-inventor-tutorials/music--player--working-with-screens  This shows how to play music files with AIClassic.   it is very similar for AI2.

The random part:   instead of selecting with individual names, use numerical tags on the TinyDB  and call the songs with the random number function in the Math blocks.
You will see   random integer from 1 to 100          change the "100" to reflect the number of mo3s you have in the tinyDB..   Whatever   random integer from 1 to 10  (if you have 10 songs ... I am not certain you can use that many but perhaps you can)   is the tag name for the  mp3  tag number .you select from the tinyDB ..... similar to how they do it in the above example.

This will require a bit of work.    If you run in to difficulty, show your blocks image hfere and someone will help.

Regards,
Steve

Reply all
Reply to author
Forward
0 new messages