Sprite.graphics.lineTo blinks on Neko and Android


in the video you can see how affects the drawning in:


this just happen in Neko and Android; in flash it draw all nice…

any one ? on this blink problem in Sprite.graphics.lineTo

I am not too certain why the line would be blinking. When I did a quick test for Neko, my line did not blink (using OpenFL 3.6.1): Link To Video

My test used the following code. I’m not sure how it compares with your implementation.

private function startMouseDrag(e:MouseEvent):Void {
    start = new Point(e.localX, e.localY);
    end = new Point(e.localX, e.localY);
    this.addEventListener(MouseEvent.MOUSE_MOVE, updateMouseDrag);
    this.addEventListener(MouseEvent.MOUSE_UP, endMouseDrag);

private function updateMouseDrag(e:MouseEvent):Void {
    end = new Point(e.localX, e.localY);
    sprite.graphics.lineStyle(5, 0xFFFFFFFF);
    sprite.graphics.moveTo(start.x, start.y);
    sprite.graphics.lineTo(end.x, end.y);

private function endMouseDrag(e:MouseEvent):Void {
    this.removeEventListener(MouseEvent.MOUSE_MOVE, updateMouseDrag);
    this.removeEventListener(MouseEvent.MOUSE_UP, endMouseDrag);