FLIP issue help

Hi all,
I’m using this bit of code to make my numbers do a 360 flip when someone taps on it. The issue is it only works once. How do I make it flip on 2nd tap the third tap the 100th tap, basically every tap not just the first tap? --The scene has to be reloaded to make this code work again.

local function Bravo5 (event)
transition.to(num5_set5 , { rotation = 360, time=800 } )
transition.to(FIVE, { rotation = 360, time=800 } )
audio.stop()
audio.play (BravoSound)

thanks,
Jeremy
[import]uid: 127028 topic_id: 31715 reply_id: 331715[/import]

the way you have it it rotates TO 360 from 0. Subsequently, when you do it again, it rotates to 360 from 360.

You could do transition.to(FIVE, {rotation=360-FIVE.rotation, time=800})

Or you could do an onComplete in those transitions, and set the rotation to 0 there.
[import]uid: 160496 topic_id: 31715 reply_id: 126678[/import]

the way you have it it rotates TO 360 from 0. Subsequently, when you do it again, it rotates to 360 from 360.

You could do transition.to(FIVE, {rotation=360-FIVE.rotation, time=800})

Or you could do an onComplete in those transitions, and set the rotation to 0 there.
[import]uid: 160496 topic_id: 31715 reply_id: 126678[/import]