Go4Expert (http://www.go4expert.com/)
-   JavaScript and AJAX (http://www.go4expert.com/forums/javascript/)
-   -   Simple graphics in web-browser (http://www.go4expert.com/forums/simple-graphics-web-browser-t17012/)

Typr451 21Apr2009 09:58

Simple graphics in web-browser
Hi! I'm going to make a graphical thing for the content of a database for this cource. For example if there's a table with a many-to-many relation I want to print out the entires with lines to the other entires like they're related to display a nice tree.

I've been thinking about a way to do this. I've never done anything in ActionScript so I've been leaning a lot towards learning it. I've done some work in OpenGL and I've programmed for some years so I'm not afraid of ActionScript :)

Anyway, I've been thinking, there are basically two reasons I'm thinking about picking ActionScript. The first being I want to learn it, but other than that I just want to draw the lines between the entires. I was reading up on graphics in JavaScript and someone had done a library by using div-tags as pixles, then I thought I could probably pretty easily draw the lines with divs. I'm thinking it'll print out like this:

Child Child Child

So it's basically pretty straight lines. I understand Flash is very nice for animation, but I don't think I'll need that. My question I think is this: Is it uneccessary hard in ActionScript to make things like an expanding box around text (like a table-tag), with something like a gradient overlay background expanding with it? Also just drawing lines to a position relative to the table? What I've seen about ActionScript have been a friend's project linking animations to triggers and making a really nice game. I'm not sure how good it is to draw dynamic tables though.

The thing is just if I print my database and just use div- or even table-tags, I can format them a little and have a nice background (just repeat to fill the entire table). The tables will expand with the text print-out and the only thing are the lines which I'm hoping carfully adjusted length of divs will make ok. It's supose to be nice though so if I can't get the lines exact I'll give it up completly.

But I do want to learn ActionScript, and if I do I would probably add some quick animations so it doesn't look like I did the whole thing with divs :) However I'm afraid to start learning it if it's that hard or even impossible to make this simple thing, it's a cource afterall and it needs to be completed.

Typr451 2May2009 02:35

Re: Simple graphics in web-browser
Never mind, in case anyone looks for the same answer: I read some tutorials on actionscript.org and read the Adove live docs a little and it was no biggie doing anything I hoped to do.

All times are GMT +5.5. The time now is 11:06.