Groups | Blog | Home
all groups > flash (alternate) > january 2005 >

flash (alternate) : Retrieve n records from database


Sean Berry
1/17/2005 6:49:53 PM
I came across a tutorial about a year ago that explained the answer I seek.
Now, however, I cannot find the answer anywhere.

I have a flash movie that takes some data in a couple of input fields...
then does a loadVariablesNum("script.pl", 0,"POST"); call

My script.pl file returns something like this...
&n=10&company1=Macromedia&address1=22845 Main
Dr.&zip1=99399&company2=Microsoft&address2=33 Big Rd.&zip2=12345.... all the
way to zip10=00299

My question is this...
How do I do the following:
for (i = 1, i <= n, i++) {
text + i = (company + i) + " " + (address + i) + " " + (zip + i);
}

so that (text + i) translates to text1...text10 (and company + i) translates
to company1...company10 etc???

I know I have seen the answer, but I cannot for the life of me figure it
out.

Any help is greatfully appreciated.

Sean Berry
1/17/2005 7:11:48 PM
[quoted text, click to view]

After trying for over an hour, then posting this message, I figured it out
10 minutes later.

I would use
this["text"+i] = this["company"+i] + " " + this["address"+i] + " " +
this["zip"+i];

Thanks anyway... hope this helps someone someday.

AddThis Social Bookmark Button
View Other Months
January 2005
February 2005