1 Reply Latest reply on Jun 20, 2007 12:44 PM by ntsiii

    Handle and modify dynamically added sprite

    kerst001 Level 1
      I have a loop that reads information in from an xml file, then for each item draws a line to show a relationship:

      var child:Sprite = new Sprite();
      child.graphics.moveTo(x1, y1);
      child.graphics.lineTo(x2, y2);
      child.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);

      However, since I am looping through and adding them I do not know how to modify it in the event handler. What I would like to do is be able to change the color of it as you mouseover. Anyone have any direction on how to modify the sprite in the event handler?