Transitions not always working properly

build 820

I’m using transitions to remove a set of images when the user presses the pause button in my game. I fade out the user controls and fade in the pause menu. 1 out of 5 times this does not work right and locks up the game, both sets of things are on the screen together… was wondering if there was some sort of fix to this
steve
[import]uid: 55582 topic_id: 28134 reply_id: 328134[/import]

Are you properly canceling any existing transition before initiating a new one? I set my transition to a variable, so that way I can reference it in case I need to do a fresh one again.

if box.trans then transition.cancel( box.trans ) end box.alpha = 1 box.trans = transition.to( box, { time = 1000, alpha = 0 } )

You may get memory leaks and unexpected results if you try to apply a transition or timer on an object that gets changed or removed without notice. [import]uid: 6084 topic_id: 28134 reply_id: 113674[/import]

Also, are you properly preventing further interaction once the button has been pressed and the transition is in progress? If not, the app could be registering multiple events and trying to run a bunch of transitions at the same time. [import]uid: 6084 topic_id: 28134 reply_id: 113676[/import]

BeyondTech,

the event listeners are being removed then the transition. Only one transition is happening to the objects, they get faded out, thats it.

(it just dawned on me while typing this… i was removing a group with the trans… seem to recall reading that there was a problem with groups and transitions)

steve
[import]uid: 55582 topic_id: 28134 reply_id: 113677[/import]