Problem In Clicking Buttons

If I use 'toogle' button and I want to add two image in which one image when sound is off and one image when the sound is on. How can I do that?

Upload two images for sound on and sound off and then change the code as shown in the example

1 Like

How can I upload image in Media?

Press upload file in designer view

image

Okay and thanks

1 Like

In this I want to make a button1 in which the button1 shows the image of active button (on/off) and when I click on that button1, I can choose one button (on/off) from two (on and off) buttons. How can I do that?

Is this that you want ?

WhatsApp Image 2021-06-26 at 8.25.48 AM
Yes but I want two button in one button like this image.

You can make the popup with an extension. Without the extension, you can do something similar like this:

soundexample2.aia (5.7 KB)

As you can see, these are only minor changes to the previous code. I think you should start with the tutorials instead of creating your own app.

1 Like

Thanks for the suggestion and I am confused that where I have to put 'on', 'off' and 'toogle' buttons in Designer View?

I'm confused too, because I don't know what you mean ...

WhatsApp Image 2021-06-30 at 10.01.31 PM
Where I have to put 'on', 'off' and 'toggle' buttons like in this image?

I do not know. This is not a view with the app I put here:

Try this

soundexample_1.aia (4.5 KB)

MIT App Inventor only import files of .aix extension.

You can import an aia - project from your computer

Thanks for your help

1 Like

WhatsApp Image 2021-07-02 at 3.23.10 PM
I want only this blue box with a arrow like
WhatsApp Image 2021-07-02 at 4.17.19 PM
WhatsApp Image 2021-06-26 at 8.25.48 AM

Bit confused at what you are asking so this might not be what you wants, but why not use a switch from the user interface section then add a canvas next to it that you can set to the image you want. e.g the toggle switch is to the left then it lights green as on then you set the canvas image to a picture that shows it on. then if its toggled to the right it lights up red and changes the canvas image is set to show its off ?

if you don't understand just say and i will quickly make it and send pictures

or if you want a drop down menu, an easy way is to just put a horizontal arrangement or something below the button where you put your options in e.g sound on sound off buttons. then set its visibility to false. then you can set the first button to set its visibility to true so you see the options and when you select the on or off it disappears again

Here is only one button toogle:
soundexample.aia (4.9 KB)