How can "change attribute" be used to change the image?

chaleychaley Member, PRO Posts: 226
edited November -1 in Working with GS (Mac)
Let's say you have two different images for a button and you want to have one image switch to the other when pressed or activated.

Does anyone know the specifics on how to do this?

I tried to use the method here: http://gamesalad.com/forums/topic.php?id=30832

...but I wasn't exactly sure exactly how to implement that into my rig. I tried a few things that didn't work. Are there any tutorials or videos on how to do an image swap using "change attribute?"

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    sure, do this.

    when touch is pressed
    -change attribute self.image to the name of the pressed image

    then open up the otherwise section of that rule and put a change attribute behavior changing self image to the name of the button up image

    cheers
  • chaleychaley Member, PRO Posts: 226
    Thanks for the response. Do I have to use quotes or anything else? I tried using the name of the image straight up and it didn't seem to work.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    try the name of the image.png
Sign In or Register to comment.