Re: Flash Applications

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 52074
interpreted = N
texte = Well, it's a little complicated to exaplin without sending up a sample, but we use the Flash sendAndLoad function and then loop through the vars, creating an array that gets written out to a list object or whatever (like the Flash DataGrid component). So this is a function that gets called on a button action (e.g. "onRelease"). It establishes the object (orderData) that will receive the value/data pairs response from the .tpl page (which is creating a string in the &var=data& syntax). There is obviously code before this that takes data from input fields and other hidden variables and sends it to page.tpl. <> orderData.onLoad = orderReply; //This is a development URL addPartData.sendAndLoad("https://domain/page.tpl", orderData, "POST"); }; <> Then to write out a set of found records (as opposed to just one record, which is what most of the current Flash documentation uses as an example), you have to loop through the data. The key thing we found here was to use the "eval" context, which is like INTERPRET in WebDNA. Otherwise, the value of the vars can't be extracted and you'll just get either null or the string "var1" "var2" returned. I pass &NUMFOUND=n& back to establish how many founditems there are for the loop. So essentially, you end up getting "var1", "var2"... "varN" resolved from the the orderData object. <> function orderReply(success) { var foundListItems = orderData.NUMFOUND; //loop through founditems for (i=1; i<=foundListItems; i++) { // put it in the array myList.addItem(eval("orderData.var"+i)); } } <> At least that is the way we are doing it now. Perhaps there is a better way? There's more to it than this and it's not meant to be a tutorial, but something to think about. If there is enough interest, we could put together a sample set of Flash, HTML and WebDNA code, but we would need to see STRONG interest to do so. Christian F. Gurney Managing Director KG InterDev, LLC cfgurney@kginterdev.com (515) 255-9351 (515) 229-1969 Wireless (515) 255-9351 FAX > -----Original Message----- > From: Daniel Schutzsmith [mailto:dan@berlinprod.com] > Sent: Tuesday, August 05, 2003 8:09 AM > Subject: Re: Flash Applications > > > I've been using a work around with XML in my Flash MX sites. > Basically I have WebDNA write out an XML document and make > the nodes my fields and vars from the db. Flash MX will > process the XML a little slower than a general txt document > but there is no comparison when the actual document to parse > is nice and orderly. > > I have been experimenting with persistent connection to > PHP/MySQL via the FlashCom server but the downfall of > FlashCom is that it does run rather slowly but I would say it > would be fine on smaller sites. > > The work around you are doing is just passing the var through > the URL like http://www.mysite.com?var1=value1&var2=value2. > So how do you bring your var back in or don't you? > > ~dan > > On 8/4/03 4:51 PM, "Christian F. Gurney" > wrote: > > > We've been experimenting with using Flash MX on the client side to > > replace multi-page HTML form/response elements. The particular > > solution is for users to look up and fill in a parts order from a > > fairly large database (33K + items). One advantage is that > we really > > cut down on the amount of data being sent to the client and avoid > > issues with frames and the like. I'm sure people are doing > this with > > Java, but we don't have a budget for that at the momement. > > > > It seems to be going well and while WebDNA is not a app that > > Macromedia writes connectors for, we've managed to > accomplish a fair > > amount by passing data back the client in URL-encoded strings. > > > > Anyone out there doing anything similar? > > > > Christian F. Gurney > > Managing Director > > KG InterDev, LLC > > cfgurney@kginterdev.com > > > > > > > > ------------------------------------------------------------- > > This message is sent to you because you are subscribed to > > the mailing list . > > To unsubscribe, E-mail to: > > To switch to the DIGEST mode, E-mail to > > > > Web Archive of this list is at: http://webdna.smithmicro.com/ > > ----------------------------- > Daniel Schutzsmith > Senior Web Developer > Berlin Productions, Inc. > dan@berlinprod.com > http://www.berlinprod.com > (914) 683-5759 > (914) 683-5751 fax > ----------------------------- > > > > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Flash Applications ( "Christian F. Gurney" 2003)
  2. Re: Flash Applications ( Daniel Schutzsmith 2003)
  3. Flash Applications ( "Christian F. Gurney" 2003)
Well, it's a little complicated to exaplin without sending up a sample, but we use the Flash sendAndLoad function and then loop through the vars, creating an array that gets written out to a list object or whatever (like the Flash DataGrid component). So this is a function that gets called on a button action (e.g. "onRelease"). It establishes the object (orderData) that will receive the value/data pairs response from the .tpl page (which is creating a string in the &var=data& syntax). There is obviously code before this that takes data from input fields and other hidden variables and sends it to page.tpl. <> orderData.onLoad = orderReply; //This is a development URL addPartData.sendAndLoad("https://domain/page.tpl", orderData, "POST"); }; <> Then to write out a set of found records (as opposed to just one record, which is what most of the current Flash documentation uses as an example), you have to loop through the data. The key thing we found here was to use the "eval" context, which is like INTERPRET in WebDNA. Otherwise, the value of the vars can't be extracted and you'll just get either null or the string "var1" "var2" returned. I pass &NUMFOUND=n& back to establish how many founditems there are for the loop. So essentially, you end up getting "var1", "var2"... "varN" resolved from the the orderData object. <> function orderReply(success) { var foundListItems = orderData.NUMFOUND; //loop through founditems for (i=1; i<=foundListItems; i++) { // put it in the array myList.addItem(eval("orderData.var"+i)); } } <> At least that is the way we are doing it now. Perhaps there is a better way? There's more to it than this and it's not meant to be a tutorial, but something to think about. If there is enough interest, we could put together a sample set of Flash, HTML and WebDNA code, but we would need to see STRONG interest to do so. Christian F. Gurney Managing Director KG InterDev, LLC cfgurney@kginterdev.com (515) 255-9351 (515) 229-1969 Wireless (515) 255-9351 FAX > -----Original Message----- > From: Daniel Schutzsmith [mailto:dan@berlinprod.com] > Sent: Tuesday, August 05, 2003 8:09 AM > Subject: Re: Flash Applications > > > I've been using a work around with XML in my Flash MX sites. > Basically I have WebDNA write out an XML document and make > the nodes my fields and vars from the db. Flash MX will > process the XML a little slower than a general txt document > but there is no comparison when the actual document to parse > is nice and orderly. > > I have been experimenting with persistent connection to > PHP/MySQL via the FlashCom server but the downfall of > FlashCom is that it does run rather slowly but I would say it > would be fine on smaller sites. > > The work around you are doing is just passing the var through > the URL like http://www.mysite.com?var1=value1&var2=value2. > So how do you bring your var back in or don't you? > > ~dan > > On 8/4/03 4:51 PM, "Christian F. Gurney" > wrote: > > > We've been experimenting with using Flash MX on the client side to > > replace multi-page HTML form/response elements. The particular > > solution is for users to look up and fill in a parts order from a > > fairly large database (33K + items). One advantage is that > we really > > cut down on the amount of data being sent to the client and avoid > > issues with frames and the like. I'm sure people are doing > this with > > Java, but we don't have a budget for that at the momement. > > > > It seems to be going well and while WebDNA is not a app that > > Macromedia writes connectors for, we've managed to > accomplish a fair > > amount by passing data back the client in URL-encoded strings. > > > > Anyone out there doing anything similar? > > > > Christian F. Gurney > > Managing Director > > KG InterDev, LLC > > cfgurney@kginterdev.com > > > > > > > > ------------------------------------------------------------- > > This message is sent to you because you are subscribed to > > the mailing list . > > To unsubscribe, E-mail to: > > To switch to the DIGEST mode, E-mail to > > > > Web Archive of this list is at: http://webdna.smithmicro.com/ > > ----------------------------- > Daniel Schutzsmith > Senior Web Developer > Berlin Productions, Inc. > dan@berlinprod.com > http://www.berlinprod.com > (914) 683-5759 > (914) 683-5751 fax > ----------------------------- > > > > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ "Christian F. Gurney"

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

File Upload (1997) [WebDNA] HTML/OS vs. WebDNA ? (2008) Search-context (1999) [WebDNA] Re-sending email (2018) Add - optional parameters textA=.... (1997) Oops! (1998) [WebDNA] WebDNA receiving numerous signal SIGSEGV then crashing (2016) Lost and Recovered. (1998) Instructions for Digest (1997) Cart Unique After Rolling Back Time? (2001) RE: spawn (1998) Protect vs Authenicate (1997) Trouble with formula.db + more explanation (1997) WebCat2 - [format thousands] (1997) Triggers (2003) Location of Browser Info.txt file (1997) Summing fields (1997) Strange intermittent WebDNA problems (2008) date search not working when type=date specified (2007) random within a specified range (2001)