Hi,
i have a litte problem/bug. MMF2 apparently adds the wrong float-value to a flash-exported game.
that happens occasionally....
Example :
i'm add 0.05 to my counter
MMF2 add 0.0499999 to my counter :-/
See the Examplefile (Flash & MFA)
Hi,
i have a litte problem/bug. MMF2 apparently adds the wrong float-value to a flash-exported game.
that happens occasionally....
Example :
i'm add 0.05 to my counter
MMF2 add 0.0499999 to my counter :-/
See the Examplefile (Flash & MFA)

This isn't a bug, it's just not preventable from what I know. Floats will always be imprecise. I suggest using large numbers, and for displaying them just divide by a number to get the float.
Working as fast as I can on Fusion 3

Floating point numbers can represent any fraction with a power-of-two denominator within their range. Any other fraction turns out inaccurate, including a lot of numbers which look perfectly sensible to us, like your 0.05. It's exactly the same as trying to represent 1/3 in a fixed number of decimal digits. e.g. trying to represent 1/3 with 8 decimal places, the closest you can get is 0.33333333, which is still 1/300000000 out.
Just a general limitation of computers I'm afraid.
Digging up the thread.
I am having this exact issue in my Flash game but I don't quite get why I don't have this issue in the MMF2 version?
If floats are so imprecise then why can the .EXE stand-alone handle adding 0.1 to a value? Only the Flash exported version has this issue.








I Just read through the Flash help file last night and this is what the mmf2 help file had.
Help / Contents
Multimedia Fusion Developer Help
--Contents
---Distributing your application
----SWF files for Adobe...
-----SWF / EXE differences
- Floating point calculations are less precise than in Windows applications : usually a counter after a floating point calculation shows a lot of digits after the dot. To solve that problem, you should force the number of digits displayed after the dot in the counter object properties in the frame editor.
- Due to internal encoding of floating point numbers, comparison between floating point numbers may never be true. For example "Counter = 1.23" may not be true as the counter might be at 1.229999999. The solution here is to make a greater/smalled comparison with two conditions. Example "Counter>1.28" and "Counter<1.31". Note: this is true with the Windows runtime too! However calculations are more precise in the Windows runtime, so this problem may occur less often.
Apparently the flash exporter has a limitation for only 2 decimals points.
hope this helps.
It certainly did, thanks twister!
Now gentlemen if you excuse me I got to convert some of global values to counters.