March 28th, 2003, 06:32 AM
jsp, mySQL import into flash
I have a problem and a question. Any help is greatly appreciated.
I´m setting up a website running unix, apache, mySQL and jsp. I would like a flash frontend to the site but have a need of publishing tables of data from the database. My question is if it is possible to do this inside the flash area of the frontend.
I´m not a programmer, I just try to get information enough to take a decision on how to approach it. So in any answer please leave out the code parts ;-)
March 28th, 2003, 11:48 AM
there are no "tables" per se in flash. However, through some simple code you could take the jsp output and construct your own tables. There are also many components (the data grid for example) that are built specifically to help flash's lack of support for native tables. It's plenty possible, but will just take a little work around...
also, what kind of data will you be displaying? the datagrid is only for textual data. If you need pictures in there, you'll need to build your own "row" element and just duplicate and allocate as you need. It will take an intermediate amount of Flash knowledge to be able to take the data and turn it into what you want (just to warn you).
March 31st, 2003, 02:39 AM
Sounds like a waste of time to get into that type of flash programming since the data partly consists of pictures.
The thing is, I´d like to show different buildings with a reasonable amount of textual data like architect, building year and stuff, and of course an undefined number of pictures of that building. Maybe the best solution is to leave the flash front end when displaying the buildings. But it would be a lot more boring...
March 31st, 2003, 04:11 AM
well, i'm not saying it's not possible... there are plenty of methods you could use to integrate pictures into dynamic flash pages... it will just take a little (a lot of) work... basically you'll have to build your page, knowing the exact dimensions of every element on the page. that's not so hard, since everything has a _width and _height property, but to make a completely dynamic page would take a little effort...
March 31st, 2003, 04:52 AM
Well, it´s the workload I´m afraid of and try to work around ;-)
The problem is, as I understand it, that the pictures should be uploaded by a number of people (not that many, but many enough) that you can´t trust to adjust pictures to a certain width and height. That means that I have little control over the sizes of the pictures and the number of pictures.
Is the method otherwise to have actionscripts interpreting the jsp-pages or could flash actionscripts communicate directly with the sql? (I´m on thin ice here, just had to ask anyway. Feel free to laugh if it was a silly question)
I guess there is a long row of obstacles which has to be overcome, the easiest way out - even if it´s less fun - maybe is to display the jsp page instead...
March 31st, 2003, 05:49 AM
you'll have to forgive me if this isn't all clear, it's about 4:30 am here...
Flash can't directly communicate with any server side technology. What it can do is load .jsp, PHP, .asp, .pl etc. pages that format the output in a way that flash can interpret it. That basic format is as follows:
Instead of having your Java server page write out HTML, it would write out all of the data that you want to display, (or even give links to pictures that flash could load in) and then once flash loads all of the &variable=value pairs in, it could build the pages dynamically from within the Flash movie. The sizing of the pictures shouldn't be a problem because you can resize/resample them server-side, or resize them once they get loaded into flash.
If you want to learn more of the details of the Flash side of things, i would suggest that you look at the loadVariables() and LoadVars() objects. These will be the primary methods of getting data in and out of flash.
Your .jsp page will obviously have to change in it's formatting, as it will no longer be writing an HTML page... one thing you might consider, because it sounds like it might make your data organisation easier, is to format an XML document, instead of the &variable=value method. Flash has a built in XML parser that works pretty well, and it would be a lot clearer as to what data you were loading in. i have actually one no work with .jsp, but i know that PHP has a built in XML class, and .jsp should have the same.
i wasn't trying to discourage you from the project, i just wanted to let you know that it will take 1) a lot of planning, both server side and client side and 2) a good understanding of dynamic data in Flash, including loadVariables, LoadVars and/or XML in flash.