What i’m trying to do is to create a random number generator where if a number = 1 play Jack Benny.
Nothing happens when i hit the tuner button.
Any ideas?
If the random number =2 play WB
What i’m trying to do is to create a random number generator where if a number = 1 play Jack Benny.
Nothing happens when i hit the tuner button.
Any ideas?
If the random number =2 play WB
Audio_Sources it will always be 0 since it is not assigning a value, just comparing.
A very good way to learn App Inventor or Kodular is to read the free Inventor’s Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps … the links are at the bottom of the Web page. The book ‘teaches’ users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you…? .
Also do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor
Taifun
I vreated that label. what i want to is take the number from the random gemerator and put it in a sub routine.
remove the first if statement and set the global variable Audio_Sources like this
set global Audio_Sources to random integer from 1 to 2
Taifun
Thats What im asking u?
Assuming Audio_sources = 1 the process would be as follows.
I think you should improve your logic and then put your blocks together.
If it is not worth 1 it is because it is worth 2, I don’t know why you put a conditional again.
It’s about common sense
Taifun
If i dont do it that way the audio players wont stop
Unclear
Your project is about playing a random audio, isn’t it? What about describing your requirements?
Taifun
What do u mean?
Please describe your requirements
Taifun