thesurfinsuricate wrote: ↑April 14th, 2023, 8:21 pm
I would like the animation to start from frame 1
balala wrote: ↑April 14th, 2023, 8:59 pm
If you want the animation to start from frame 1, not 0
will actually start by having an initial value of 1 and not 0 after its update, because the result of the formula in the first update of the measure would be MeasureAnimation + (MeasureAnimation < 18) = 0 + (0 < 18) = 0 + 1 = 1
- you can easily notice this if you set an UpdateDivider=-1
on the measure, for example. Whether that "1" is the desired "frame 1" in the request is open to interpretation, I'm just talking about the measure itself, since that is the reference for the meter.
Sure, by disabling / enabling that measure and adding a [MeasureAnimation2]
as above, the animation will start at frame 1 ... but when mouse leaves the area and the measure is disabled, the measure values returns to 0 and 1 instead of staying the same, which might not be what is desired (as far as I understood, frame 1 should be displayed again only on animation restart, when the mouse is again over the area, not when it leaves). Another question is what happens to frame 0 if the animation runs from frame 1 to frame 18, would it still be in the .png, because as far as I can see, it won't ever be used? Lastly, if I'm not missing anything obvious here, if [MeasureAnimation2]
runs from 1 to 18, then [MeasureAnimation]
should stop at 17, not to mention that BitmapFrames should be 19 to include the assumed frame 0.
Anyway, considering the above, some small changes (I left out the unimportant parts of the code):
Code: Select all
Formula=MeasureAnimation + (MeasureAnimation < 17)
Formula=( MeasureAnimation + 1 )
MouseOverAction=[!UnpauseMeasure MeasureAnimation][!DisableMeasure MeasureAnimation][!UpdateMeasure MeasureAnimation][!UpdateMeasure MeasureAnimation2][!EnableMeasure MeasureAnimation]
Feel free to disagree or disregard, if my understanding of the request has been faulty.