Hey, Alex, I’m not sure what you are trying to do, but if you want a button that is animating (two-frame animation that is constantly toggling between two frames), you might want to look into using a sprite object. You can make a sprite object into a button by adding EventListener and make it respond to touch, tap, etc. If you don’t want the images to toggle constantly on its own, and instead, if you want it to change its look when the button is touched, you can still use the same sprite object. In this case, instead of playing the sprite (that would animate the object), you’d want to setFrame, switching its frame each time it is touched, tapped, etc.
I hope this makes sense. Good luck.
Naomi
Edit: One more thing, if you want the button to behave differently – i.e., if you want the touch/tap to do something different each time it is touched/tapped, I think you can change its behavior by removing/adding EventListener. Or at least that’s how I’d go about experimenting how it goes.
And… if I’m using widget (instead of animated sprite object), I’d just change the widget’s onRelease property each time – and, even though I haven’t tried this before, I’d try and see if I can change the widget’s defaultIndex and overIndex property at runtime (assuming the widget is using image sheet for its look.) [import]uid: 67217 topic_id: 33339 reply_id: 132444[/import]