I am trying to create “radio buttons” with 2 images. What I am trying to do is make it so when you click a button it changes to a lighter image, and then when you click that lighter image it turns back to the darker image. I want this to happen an infinate amount of times so they could technically do it all day without restarting the app. Anyone know a simple solution to this.
local sunroof = display.newImageRect("images/sunroof.png", displayWidth, 60);
sunroof:setReferencePoint(display.CenterReferencePoint);
sunroof.x = displayWidth/2; sunroof.y = sunroof.height \* 2 + title.height \* 1.5 -50;
function rectlistener()
sunroof:removeSelf()
sunroof = display.newImageRect("images/sunroofClicked.png", displayWidth, 60);
sunroof:setReferencePoint(display.CenterReferencePoint);
sunroof.x = displayWidth/2; sunroof.y = sunroof.height \* 2 + title.height \* 1.5 -50;
sunroof:removeSelf()
sunroof = display.newImageRect("images/sunroof.png", displayWidth, 60);
sunroof:setReferencePoint(display.CenterReferencePoint);
sunroof.x = displayWidth/2; sunroof.y = sunroof.height \* 2 + title.height \* 1.5 -50;
end
This is so far my code but i have no clue on what to do now.
Thanks [import]uid: 153468 topic_id: 27777 reply_id: 327777[/import]