Drawing With the UIComponent (4)

This is another example of drawing with your mouse… This iteration has added one main feature, ResizeHandles to the LineTool. Now you can resize the Line as you please.

Application Source

The basis of what changed in the line tool, is exactly what I stated above… if you take a look at Version 3 of the Drawing package

Version 3 ApplicationVersion 3 Source

You will see that all you could do was draw a line and a rectange, depending on the chosen tool… I saw a post on flexcoders about drawing and editing drawing lines. I really didn’t feel like working on my “work” project for some reason… so i read some flexcoders and then decided to make an example of this.

Here are some links to previous posts on DrawingWithTheUIComponent:

6 comments on this post.
  1. alex:

    Hy there!
    you have avesome tutorial here!
    keep goin’!
    best regards

  2. Arche_Lee:

    Hey,this app has a bug
    when draging to draw with the drawingtool
    if drag out of the stage
    throw a exception like this:

    [Fault] exception, information=TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::Event@411bd61 to flash.events.MouseEvent.

    It does not dispatch the stage mouseleave event

    And i can not check by the debuger

    My english is poor can you help me solve the problem?

    if you can please send me a email to lihui5888@163.com

  3. Arche_Lee:

    Now I knew what is the problem

    protected function mouseLeaveHandler(event:MouseEvent):void

    Here, the function defines

    it should be :

    protected function mouseLeaveHandler(event:Event):void

  4. Arche_Lee:

    but it is not a good experience/performing by
    drag a line whih a suspend when the mouse leave the stage

  5. Jo Nguyen:


    You have done an awesome application
    Thanks so much for this.

    Keep going and good luck.

    Best wishes

  6. balaji swaroop:

    this is a nice example. how abt resizing the rectangle ?

Leave a comment