dynamically drawing a graph
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: dynamically drawing a graph

  1. #1
    Senior Member
    Join Date
    Mar 2002
    Posts
    160
    hello everybody,
    i need to dynamically draw a graph,by letting the user enter some values for (x,y) points, i shoud have these points appearing on the graph in their approberiate place till i have 6 different values and six different points each with different color i can join these points at any stage having a line resembling the relation , how could i ??????

    THANKS IN ADVANCE

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Location
    Sydney, Australia
    Posts
    271
    Use the drawing API i.e. lineTo(x,y);

  3. #3
    if ur using flash 5 just duplicate movie clip of a line

  4. #4
    Gross Pecululatarian Ed Mack's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    2,954
    Make a line clip, that has a line going from the center, to (100,100). To make this line go from point x,y to point x',y' do this:

    Set the clip's _x to x and _y to y
    Set it's _xscale to x'-x
    Set it's _yscale to y'-y

    And that's it

Posting Permissions

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




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com