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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

irritating redundant database questions 1

Status
Not open for further replies.

quickblueink

Technical User
Apr 5, 2001
57
US
Ok, my head is swimming trying to get this all sorted out in my head:
I write a database with, say, a unique ID, description, and picture of each item. then i do an ASP (or JSP) page which calls that database, and last i do a flash page with blank dynamic text boxes that call for that ASP/JSP page, which finally displays the finished product on the flash page.
thats kinda what it looks like from the threads and tutorials that i have found, but nothing has been crystal clear enough to pierce my thick head.
i guess i just want verification of that, because up until the above epiphany (which came like a blinding light) i was thinking that i was supposed to write the ASP/JSP directly into the flash pages, which, believe you me, caused very many headaches (also in blinding light format).
so, am i right, completely wrong, or can anyone offer a better explanation?
thanks, Yall
M.austin
 
The way I tend to do it is via a loadVariable type command from within Flash.

1) The Flash page is loaded into your browser
2) Flash issues a load variables command against an asp page (e.g.: my_variable.asp).
3) The ASP page then potters off to the database, grabs what it needs and then 'writes' the values into a url encoded format that Flash can read.

For example, if you read in the values 'name' and 'street' and 'age' from the database then you need to get ASP to 'write' these values in a format like...

&name=bob&street=here&age=99&

Just like the values get written to the url address line (see Flash help files for more info. on the formatting).

4) Flash receives the values and you can then use them to populate the text boxes, move things around, whatever you darn well like!

X-)

PetitPal.
 
Thanks for answering that question Petit, I was wondering how to do that, but didn't NEED to, but now I know...and knowing is 1/2 the battle, G.I. JOE!

How would you send information to the ASP page, and load a variable coming back?...(Trying now to get Flash to integrate to write to database etc.) ----------------------------------------
Luke WhiteTiger: "to the rescue!"X-)
Oldnewbie: "Luke, you must first learn to use the force first"
 
I would guess that sending information is the same but in reverse;

1) Setup your variables in Flash

2) Use the getURL jobbie to call your ASP page and send the variables to it; this can then process the values that you selected. (I would guess that the best way to do this would be to use a different target window and then have the asp page write something to it like 'saving data' or something so that the use knows whats going on).

3) You would then need to get your Flash movie to re-call the asp page I talked about in my first post to re-load any relevant values.

4) This is all a bit tricky realy isn't it? I thought that there was some product or other like Drumbeat which was supposed to provide integration for Macromedia products to databases; but I could be horribly wrong! Either way it's worth badgering Macromedia to put some ODBC calls into the next version of ActionScript; which would be fairly awesome!!!

=)

PetitPal.

p.s. None of this post may make sense (we're all working too many hours here at the moment and things like screens aren't necessarily focusing right now!!! =) )
 
I figured out this morning that you can use generator to write flash templates, essentially with blank image, text, list and even movie clip place holders, and then assign the main timeline with a SQL string to a database, which seems to eliminate the ASP/JSP pages.

is that the coolest thing ever?
or am i completely wrong about it?

Thanks, Yall
M.austin
 
Well, is it the coolest thing ever, or are you completely wrong? I am working on something similar and I have the same upside-down-at-unknown-depth-in-the-ocean feeling you had a year ago.

I'd be most grateful for an update!

Ron
 
it is, in fact, the coolest thing ever.

there are a couple of hinderances though. first of all, you cannot test dynamic flash pages in flash, with the "play" feature, you actually have to publish it and test in a browser. unfortunately, it gets worse. you cannot test even in browser mode unless you have a webserver with an ODBC open. this is assuming you are pulling info from a database.

it helps immensely if you know about ASP or some other server side programming (JSP, PHP, etc.). but if you understand those at least enough to know how to link to a database or other outside data source, you should find making generator work for you a breeze. the same way that the "actions" panel will let you drag and drop actionscript (as opposed to typing), so will the generator plug in make server siding almost, well, fun.

I hear that the new Flash, MX (or something like that), is even more devoted to dynamic flash, so it might be worth free trialing. I still use 5.0, because i'm a poor student with no job at present (send pity remarks to quickblueink@hotmail.com), but that seems to work for me.

Let me know if you are having any specific problems and I will try to help.

--M.austin PS for an example of dynamic Flash, check out
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top