on click on button -> set frame to 1-self.frame
Great suggestion. I added a second frame to my on button graphic with the off button graphic. So now it has two frames.
on click on onButton -> set frame to 1-self.frame
says "frame is not an expression or instance variable in onButton"
so I tried this:
on click on onButton -> set frame to 1-self.AnimationFrame
But now when I launch my game, it imedialtly jumps to the second frame, even though I havent clicked on anything, and the "initial frame" is set to 0.
Is this normal? how do I stop it animating and runing through the frames on its own?
I tried resetting the frame to 0 in the "on loading finished" and in the "on end of layout", but it still comes up showing frame 1 after the game has loaded for the first time. After thay, your frame toggle works fine.