0 Replies Latest reply on May 31, 2007 10:58 AM by HellRester

    Array.forEach slow

    HellRester
      I created an array , i can fill it with some custom sprite(waypointSprite Class). But the number depends of the user...

      i used:
      //----------------------------------
      function RedrawChilds() {
      _waypointList.forEach(RedrawChild);
      SpawnBaseClip._lastSpawn = this;
      WaypointBaseClip._lastWaypoint = null;
      }
      function RedrawChild(element:*, index:int, arr:Array) {
      element.Draw();
      }
      //----------------------------------
      the Draw function draw a circle and a line (from parent entity)

      But it s definitively too slow, what can i use? (like the list in c#)

      Thanks