Okay, i may be going crazy but slap this on frame one of a flash file and observe the output:
////////////////////////////////////////////////////////////////////////////////////////// var incrementNum:Number = 0; var oldNum:Number = 0; var resultNum:Number =0; onEnterFrame = function(){gogo();} function gogo() { oldNum = incrementNum; incrementNum += 0.1; resultNum = incrementNum - oldNum; trace("old: "+oldNum); trace("inc: "+incrementNum); trace("res: "+resultNum); trace(""); } stop(); ////////////////////////////////////////////////////////////////////////////////////////// For those who dont have the time to test it the output follows like this: ////////////////////////////////////////////////////////////////////////////////////////// old: 0 inc: 0.1 res: 0.1 old: 0.1 inc: 0.2 res: 0.1 old: 0.2 inc: 0.3 res: 0.1 old: 0.3 inc: 0.4 res: 0.1 old: 0.4 inc: 0.5 res: 0.1 old: 0.5 inc: 0.6 res: 0.1 old: 0.6 inc: 0.7 res: 0.1 old: 0.7 inc: 0.8 res: 0.1 old: 0.8 inc: 0.9 res: 0.1 old: 0.9 inc: 1 res: 0.1 old: 1 inc: 1.1 res: 0.1 old: 1.1 inc: 1.2 res: 0.1 old: 1.2 inc: 1.3 res: 0.1 old: 1.3 inc: 1.4 res: 0.1 old: 1.4 inc: 1.5 res: 0.1 old: 1.5 inc: 1.6 res: 0.1 old: 1.6 inc: 1.7 res: 0.1 old: 1.7 inc: 1.8 res: 0.1 old: 1.8 inc: 1.9 res: 0.1 old: 1.9 inc: 2 res: 0.0999999999999999 old: 2 inc: 2.1 res: 0.1 old: 2.1 inc: 2.2 res: 0.1 old: 2.2 inc: 2.3 res: 0.1 old: 2.3 inc: 2.4 res: 0.1 old: 2.4 inc: 2.5 res: 0.1 old: 2.5 inc: 2.6 res: 0.1 old: 2.6 inc: 2.7 res: 0.1 old: 2.7 inc: 2.8 res: 0.1 old: 2.8 inc: 2.9 res: 0.1 old: 2.9 inc: 3 res: 0.1 old: 3 inc: 3.1 res: 0.1 old: 3.1 inc: 3.2 res: 0.1 old: 3.2 inc: 3.3 res: 0.1 old: 3.3 inc: 3.4 res: 0.1 old: 3.4 inc: 3.5 res: 0.1 old: 3.5 inc: 3.6 res: 0.1 old: 3.6 inc: 3.7 res: 0.1 old: 3.7 inc: 3.8 res: 0.1 old: 3.8 inc: 3.9 res: 0.1 old: 3.9 inc: 4 res: 0.0999999999999996 old: 4 inc: 4.1 res: 0.0999999999999996 old: 4.1 inc: 4.2 res: 0.0999999999999996 old: 4.2 inc: 4.3 res: 0.0999999999999996 old: 4.3 inc: 4.4 res: 0.0999999999999996 old: 4.4 inc: 4.5 res: 0.0999999999999996 old: 4.5 inc: 4.6 res: 0.0999999999999996 old: 4.6 inc: 4.7 res: 0.0999999999999996 old: 4.7 inc: 4.8 res: 0.0999999999999996 old: 4.8 inc: 4.9 res: 0.0999999999999996 old: 4.9 inc: 5 res: 0.0999999999999996 old: 5 inc: 5.1 res: 0.0999999999999996 old: 5.1 inc: 5.2 res: 0.0999999999999996 ////////////////////////////////////////////////////////////////////////////////////////// so the res value continues on like that being 0.0999999999999996 rather than 0.1.. anyone have any idea why flash does this??? _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com