Hi guys,

I have an animation. When you press the button, animation starts and when some conditions are ok, it stops.

When you press again to the button, animation starts again but here is the problem: normally, in animation, there is a Math.floor(Math.random()) function. for first click to button, it works perfect. but then, when you press again the button, it doesn't work. Instead, it gets the previous value.

How can I generate new value when I click the button?

Note: I try to add a property int n: Math.floor(Math.random()*1500+600) as a condition when I press the button, and I think that when I press the button, it should change the value, but it doesn't work too.

I'm using QT Quick, any idea?