Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating line graphs with flash

Status
Not open for further replies.

joezapp

Programmer
Feb 26, 2001
63
GB
I'm looking at Flash as a tool to dynamically create simple line graphs (max ten lines on any one graph). Ideally users could use mouseover to read the x and y values - any funky animation would be a bonus. I guess you can write some sort of generic movie that you can pass values to either in the URL or referenced from a file. I don't know whether you could reference a number of element's absolute position on screen and then join them up ???

As a complete newbie to Flash (which should be obvious - my background is PL/SQL, DHTML, javascript, CGI, Perl) I'd really appreciate it if anyone has any links or movies they think may be useful - I've checked out the previous 'graph' thread and links which has given me some ideas but it's not really what I'm after.

Many thanks,

Joe. :)
 
When I get chance (as opposed to sneaking here in the middle of the working day!) I'll have a think about this... ...for now though have a look at some of the sample movies that come with Flash V5.0 - there's all sorts of good stuff with duplicating movies depending on variables and so on - which you may be able to use.

Essentially, I guess you would have a movie clip [symbol] which is a circle, square or whatever you would like to represent your points on the graph. Then, you just write some action script to load variables in (see the ActionScript reference entry for LoadVariables in the Flash help stuff) and then duplicate this movie clip per point on the graph, using the setProperty command to change the _x and _y of each one to move it to the correct place on your graph. I can't remeber if Flash has a thingy to let you draw lines in ActionScript; if not then just draw one in another Movie clip and duplicate this in the same way as the graph points; and set all the _x, _y malarky accordingly (and possibly the scale ones too).

For the mouse over thing you could create a new mouse pointer (see help files) which displays a variable (i.e.: the relevant mouse over value).

Hopefully this is of help; it made sense while I was writing it (but doesn't it always); so if you have any problems give me a scream.

=)

PetitPal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top