How to use only 2 buttons for play, stop and resume

Hi everyone ,
I am making a music app which needs only 2 buttons so that it won’t be messy. I need these 2 buttons for play, stop and resume.
If u have any suggestions, please share them with me!

You can programmatically change the caption of one of the buttons. For example, the button “Play” once pressed, you will check [on source loaded] event and change the caption of the button to “Stop” before playing the file. This way you use one button for both operations.

Of course you need to check for errors and make sure the button displays the correct caption.

In the button [click] event you will check the caption of the button and decide what to do.

Hope this help :grin:

oh okay will do that .
Thank You

Can u pls send me the code as i tried, but it did not work
Thank You

1 Like

@tanisshagunjal Please share your blocks.

1 Like

I think you have to use if then also.

so now its playing and pausing properly…but when i play it again it goes back and starts from the start…it should just resume and i tried putting the resume component after the pause …but didnt work

1 Like

@tanisshagunjal You have to use if then else if.
I hope you understand what I am saying.

@tanisshagunjal Hey, Your problem was solved?

nope… but sorry to disturb u with all these questions !

1 Like


i literally tried everything

Hey, But why you have used when button click app variable play to true? Please delete that block and then check. May be it works.

Have you checked, it works?

yup it worked
thank you

Now, Not say afterwards like this. Here everything is easy. If you faced any problem you can ask here(in community?)

I hope you understand.