I am trying to pause and start background music with one button. How do we code this? Thanks!
well here is the algorithm for it -
set the button text to start then
when button click
if button text = start
then
start the player
set button text to pause
else
pause the player
set button text to start
well i told the same thing
yes but maybe blocks help more
Note: This yellow marked block is only necessary if the sound is not looped.
If it is looped, there will be gaps between the loops (transitions) with the Player
component. To avoid this, you have to use the TaifunPlayer
extension and OGG
format instead of MP3
.
Got it thank you everyone!
i know this is an old post i'm sorry but could someone @EmiratesFan001 @preetvadaliya show me an image from the designer page of this happening and not the blocks please
Hello Hottunez
Just make a test file using the Blocks as shown.
so should i remove all thats circled
rite were does the aia go
-
You should only use 1 button and not 2
A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... 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: http://www.appinventor.org/bookFiles
How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .
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
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
It is best if you work the blocks out yourself. Don't take AIAs for granted. Also, please do not promote your help topics elsewhere. Wait for a user to read your post and respond.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.