Error: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page.

Please enter a title.

You can not post a blank message. Please type your message and try again.

This is part of a bigger project, but I've tried to simplify
the problem.

My basic logic is:

Start with a variable (_root.lapZ) and set it to 0
Action 1: If the decimal point is 0.0 then add 0.2 to it.
Action 2: If the decimal point is 0.8 then add 0.2 to it.
Action 3: If the decimal point is 0.6 then add 0.2 to it.
Action 4: If the decimal point is 0.4 then add 0.2 to it.
Action 5: If the decimal point is 0.2 then add 0.2 to it.
Action 6: Go back to action 1

In theory, this should continually add 0.2 to the variable
lapZ forever BUT it doesn't!

If you start at 0, it fails to add any more after 0.6! If you
start at 1.8 if fails to add more after 2.4

Below is a simplified version of the script I'm using to
calculate the decimal point and the loop of if/then statements:

I found this making a small flash game a year ago while
detecting how far around a track the car had travelled (5 hit
tests) and having just purchased Studio 8, the bug still appears to
be there.

binary computers do not store exact decimal numbers. what you
think is 0.2 might be 0.2000000000000001 in your computer. when you
test if this number is exactly 0.2 the result is false.