Fade a Button (Interpolate)
yna205@nyu.edu
Member Posts: 49
Hi,
I'm fairly new to GameSalad. Just digging my feet into the program, and so far I'm loving it.
I'm currently trying to fade out my button and the background is white. BUT I want to make sure it fades when I click it on my iPhone device. I don't want to set a duration. Most of the tutorials I see only show how to do it using a duration. And I need help with the alpha option. My background is completely white and my button is using a PNG shape and it's a circle. Can someone please help?
Comments
Adding on, I want the button to fade out to basically white if anyone is curious so that way it won't be visible due to my white background. When I click device it says touch x and y. Not sure what those do either. Sorry it's a lot of information Lol
You could have another blank white actor in front of your button. Make the actor 0 opacity. When touch is pressed it should interpolate to 1 opacity.
Im not sure exactly what you want here as its not quite clear. You must interpolate over a duration.
Ive put together a quick demo with 2 examples. One using interpolate and one gradually fading without interpolate.
The top button fades a little each time you press it and the bottom fades all the way with one click.
Just let me know if its what you was looking for or if not, a little more instruction.
Damien
If something fades out it will fade out over a period of time, if it happened instantanioulsy we wouldn't use the term fade, therefore the duration of a fade is linked to the very concept of a fade, you can't have a fade without a duration, not just in GameSalad, but a fade anywhere.
The shape of the actor, the file format, the colour of the actor or the colour of the background make no difference, you just need to interpolate the alpha channel from 1 to 0 to make the actor fade from opaque to transparent.
I've used your click fade but when I click it I want it to change the scene as well. Is there a statement that can help me do that. Right now when it changes scenes with the interpolate method I have it doesn't show the fade
Wow! I've got it. I set another rule that when you release the button go it changes the scene! Thank you man!
Your welcome
Can you help me with this too? http://forums.gamesalad.com/discussion/73259/moving-background#latest