Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: Loadvariables with undefined number of variables
From: Nicolas S.-Roy
Date: Sat, 4 Nov 2000 22:28:10 GMT

I'm trying to load an undefined number of variables with loadvariables in a
Flash movie. The server page output looks like this :

entries=3&strLastName=Doe&strFirstName=John&PhoneNumber=555-555-5555&strLast
Name1=Bar&FirstName1=Foo&PhoneNumber=444-444-4444&LastName2=Doe&Firstname=Ja
ne&PhoneNumber=222-222-2222

"entries" tells Flash how many variable sets there will be, in this case, 3.
Now I have a movie with dynamic textboxes named "LastName, FirstName and
PhoneNumber". I want to duplicate the movie for each variable set and put
the according variables in the duplicated movie. The code I have up to now
looks like this:

entries = 1;
loop = 0;
loadVariables ("http://127.0.0.6:8080/phonebook.jsp", "", "GET");
if entries != 1 {
for (loop=1; loop<=entries; loop++) {
mCphoneEntry.duplicateMovieClip("mCphoneEntry"+loop, loop+10);
setProperty ("mCphoneEntry"+loop, _y, _y + loop);
}
loadVariables ("http://127.0.0.6:8080/phonebook.jsp", "_root.mCphoneEntry",
"GET");
for (loop=1; loop<=entries; loop++) {
mCnewPhoneEntry = "mCphoneEntry"+loop;
set (mCnewPhoneEntry.strLastName, "strLastName" add loop);
set (mCnewPhoneEntry.strFirstName, "strFirstName" add loop);
set (mCnewPhoneEntry.strPhoneNumber, "strPhoneNumber" add loop);
}
}

But it doesn't really work. I can see all the variables are loaded in the
movie when I debug it, but I don't know how to pass them one by one....

Any help would be very appreciated. Thanks alot.

p.s. A direct reply would be nice ;)


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre

Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save £200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]