Fade a Button (Interpolate)

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

  • yna205@nyu.eduyna205@nyu.edu Member Posts: 49
    edited October 2014

    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

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956

    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.

  • gingagaminggingagaming FREELANCE GS DEV Member Posts: 1,685
    edited October 2014

    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

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2014

    @yna205@nyu.edu said:
    I don't want to set a duration. Most of the tutorials I see only show how to do it using a duration.

    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.

    @yna205@nyu.edu said:
    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?

    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.

  • yna205@nyu.eduyna205@nyu.edu Member Posts: 49

    @gingagaming said:
    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

    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

  • yna205@nyu.eduyna205@nyu.edu Member Posts: 49

    Wow! I've got it. I set another rule that when you release the button go it changes the scene! Thank you man!

  • gingagaminggingagaming FREELANCE GS DEV Member Posts: 1,685

    @yna205@nyu.edu said:
    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

  • yna205@nyu.eduyna205@nyu.edu Member Posts: 49
Sign In or Register to comment.