How to Make a Button that Changes Between Two Images?

Wanting to create a button that switches between two images. I have two images of a switch, one being an ON switch and another being an OFF Switch. By changing the images on a mouse down click it would change from maybe an OFF switch to an ON switch. Then by clicking the same button, it would go back to the OFF switch again. How can I create such an effect? Thanks!

SwitchOFF
SwitchOn

1 Like

Let me help.

2 Likes

Awesome thank you for the help.

Your welcome just ask me if you ever need help with your game.
It might take untill the end of a weekend for me to respond if you send a help request during the weekend.

2 Likes

Actually since you are indie is it ok if we form a team?

1 Like

That will be awesome! Thanks again for the help.

Kinda new to FlowLab so not quite sure what you mean by team. Like, make a game together?

1 Like

Yes its a feature that you can use in a game so just go to settings in your game then go to advanced settings and I don’t know what happens after that but I think that when you click the button it allows you to invite people. here is an image.

2 Likes

Yeah I will try to invite you then. See what happens. :+1:

1 Like

Ok I see what happens as well.

1 Like

I will create an empty game project and invite you through that one.

1 Like

Ok that sounds good.

1 Like

So actually it won’t let me invite people even though I have Indie. Not sure whats going on. I will have to figure it out tomorrow.

1 Like

When you send an invite, make sure that you spell the users name correctly.
Also, you send a request to the user that they have to accept in order to join your team. So, they don’t automatically join.

2 Likes

So my name is one capital B two zeros 0 one capital T and then 987 at the end.

1 Like

Even though this does work it could also be simplified. You can use one animation behavior instead and that animation it plays has 2 frames. The Off frame and the On frame. Then you could connect a toggle to a 1 and a 2 to the go-to part of the animation behavior.

Well I thought of that but I did not feel comfortable making the idle frame of the switch as the on frame or the off frame.

1 Like

What? I don’t understand.
You don’t connect the numbers to the play input you connect them to the go-to input which chooses a frame in the selected animation.

Can you show me a picture of how you do it?

1 Like

What’s weird though is the whole invite team thing is still blocked for me, even though I have Indie…