View Full Version : dynamically creating text fields and populating with data
dolby411
08-27-2004, 06:42 PM
Here's the code I have so far, the movie is 300x500 and is located at:
www.angelhousemedia.com/test
on (release) {
_root.loadVariables("family.php", 0);
var counter = 100;
for (i=1; i<=4; i++) {
_root.createTextField(i, 1, 50, counter, 270, 27);
with (_root[i]) {
text = i;
}
counter += 50;
}
}
It only outputs the last text field of 4...how can I get all 4 to display?
Thanks alot.
deQue
08-27-2004, 06:46 PM
text += i;
dolby411
08-27-2004, 07:09 PM
I made the change to text+=i; and still get the same results. the updated .swf is at the same link:
www.angelhousemedia.com/test
deQue
08-27-2004, 07:21 PM
change this:
_root.createTextField(i, 1, 50, counter, 270, 27);
to this:
_root.createTextField(i, i, 50, counter, 270, 27);
dolby411
08-27-2004, 07:42 PM
Sweet...that brings up all 4, thanks alot. Is there an explanation why _level0.family1, _level0.family2, etc. displays first and then replaced with the respective data fields?
deQue
08-27-2004, 09:41 PM
???
dolby411
08-30-2004, 04:00 PM
check out this link: www.angelhousemedia.com/test
When you click the run query button, the dynamically created text fields first display "_level0.family1" (family1 being the instance name of the text field). How do I get it to not display the location before displaying the data?
You can download the source file at the above address.
Thanks a million!
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.