# Slow drawing of objects

**URL:** <https://forum.kirupa.com/t/slow-drawing-of-objects/318929>\
**Category:** flash\
**Created:** [February 3, 2011, 5:18pm UTC](https://forum.kirupa.com/t/slow-drawing-of-objects/318929 "2011-02-03T17:18:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lashdl](https://avatars.discourse-cdn.com/v4/letter/l/b5ac83/32.png) [@lashdl](https://forum.kirupa.com/u/lashdl)\
**Post date:** [February 3, 2011, 5:18pm UTC](https://forum.kirupa.com/t/slow-drawing-of-objects/318929/1 "2011-02-03T17:18:25Z")

</div>

Hi.  
I am having this simple problem which I hope some of you can help me with.  
I’ve written a small program which detects my mouse movement and draws circles on the x- and y-position of the mouse.

code:

```auto
function drawCircle(event:MouseEvent){
    graphics.lineStyle(2, 0, 1);
    
    if(event.buttonDown){
        graphics.beginFill(0x000000, 1);
    } else {
        graphics.beginFill(0xFFFFFF, 1);
    }
    
    graphics.drawCircle(mouseX, mouseY, 40);
    graphics.endFill();
}

stage.addEventListener(MouseEvent.MOUSE_MOVE, drawCircle);

```

As you can probably see: after drawing a lot of circles the program slows down and the framerate makes the circles be placed with a large gap between them. I would guess that the program draws what is behind the current circle even though the user cannot see it?  
Can anyone tell me of a way to get past this? I can’t seem to find a solution.

Thanks for your time.
