drawing line with actionscript

Ask a Question related to Macromedia Flash, Design and Development.

  1. #1

    Default drawing line with actionscript

    Can someone tell me please how I can draw a line with actionscript that
    grows longer but not wider.

    For example from coordinate 0,0 to 200,400.


    Theo Kleuskens Guest

  2. Similar Questions and Discussions

    1. Drawing Quadratic Equation with ActionScript
      Hi, Can anyone tell me how to draw a simple quadratic equation with dynamically using actionscript? Many thanks in advance, Peder, Ottawa,...
    2. 3d line drawing
      What would be the best way to draw a free 3d spline inside the 3d world using a keyboard input (or any other input that allows accurate 3d...
    3. How is this done?? Line drawing.
      Hi, I have recently started dabbling with Flash and I came across this site: www.caststoneuk.co.uk I really like the effect of the lines being...
    4. drawing a vector line
      can someone suggest the best way to draw a line between a point and the mouseloc (mouse moving). Using vectors in flash is perfect but I want to...
    5. drawing a straight line!!! IS THIS ACTUALLY POSSIBLE??
      don't use the shift key, and drag the line out by hand, check that the top and bottom rect points are only 1 pixel apart and you will have a...
  3. #2

    Default Re: drawing line with actionscript

    Theo Kleuskens wrote:
    > Can someone tell me please how I can draw a line with actionscript
    > that grows longer but not wider.
    > For example from coordinate 0,0 to 200,400.
    Let's say you want to draw that line into the _root clip (remember the
    point of origin is in the upper left corner):

    // set the line style (5 pixel, red, 25% opacity)
    _root.lineStyle(5, 0xFF0000, 25);
    // move the "pencil" to the start position (x, y)
    _root.moveTo(0, 0);
    // draw the line (from the start position)
    _root.lineTo(200, 400);

    More information about lineTo():
    [url]http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary536.html[/url]

    Best wishes, Martin ;) * [url]http://birdy1976.com/[/url] * ICQ# 237743398
    Martin Voegeli, vom Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139