0 Replies Latest reply on Nov 12, 2006 4:02 AM by DodgeDemon

    Aliased Line drawing

    DodgeDemon
      Alright here's my predicament. I am currently writing an application using Flash 8 and ActionScript. The application is an online sketchpad, such as those you may already have seen on the internet, but the my version is specially designed for artists that draw pixel by pixel, aka Pixel Art. To do this I couldn't use the conventional way of drawing with the Drawing API because the lines that are to be drawn cannot be Aliased, and that is all that the Drawing API's lineTo will do. The temporary solution that I have come up with is to create a new movieClip instance where the mouseMoves while the mouse button is pressed, the movieClip consists of a 1x1 pixel bitmap based on the selected color variable. The problem now is that the lines are not connecting, so the drawing shows up as a series of separated pixels that do not completely connect.

      I believe that the application is not detecting every little mouseMove at certain times that the mouse is moving above a certain speed. Being that this is why the lineTo() method is called. Now I have tried slopeIntercept equations and so on for this, and nothing seems to work. Does anyone have any ideas as to what I should do?

      Here is a preview of what is going on: http://www.bluestardev.net/Pixe-Pad/index.html

      Any help would be very much appreciated. Also, if you need to know anything about how the script work at the moment, ask away and I will be glad to provide any information I can. XD