1 Reply Latest reply on Nov 19, 2012 5:29 PM by roymeo_

    The problem with multiplication by a fractional number (iphone 3gs)

    Станислав Смагин



      I have a loop in the event handler enterframe. Inside the loop — the multiplication by a fractional number.


      for (var i:int = 0; i < 200; i++){

      var n:Number = 10 * 0.12;


      As a result, on the iphone 3gs very fast memory is wasted. About 20 KB per second. After some time the memory is reset and starts again to grow. Each time you reset FPS jumps, it is not suitable for my game. When multiplied by an integer, then there is no problem.


      Does anyone had a similar problem? Is it possible to optimize this operation?


      P. S. I try Air 2.6, 2.7 and 3. This is a problem everywhere.