Hi all
I have a mathematical doubt about what kind of formula it can be done when you set the range to 0 - 100 percentage for a progress object and the user does click over the progress and instead stepping up for example to a +5 step it forward until maximum, it does backwards until get the minimum range (0)?
Example:
100 then 95 then 90, then 85 ...until gets minimum range and set the progress to 0 with progress.settext.
If I do this forward I can get this easily by a sort of script with their if and elses and so on, in onclick event like:
But I don't get the correct formula to get this effect...What's the formula for this case?
Thanks!
I have a mathematical doubt about what kind of formula it can be done when you set the range to 0 - 100 percentage for a progress object and the user does click over the progress and instead stepping up for example to a +5 step it forward until maximum, it does backwards until get the minimum range (0)?
Example:
100 then 95 then 90, then 85 ...until gets minimum range and set the progress to 0 with progress.settext.
If I do this forward I can get this easily by a sort of script with their if and elses and so on, in onclick event like:
PHP Code:
Progress.SetStep("Progress1", 5);
Progress.StepIt("Progress1");
Progress.SetText("Progress1", Math.Round(Progress.GetCurrentPos("Progress1"), 0).." %");
end
Thanks!
Comment