1. what's c? it's not defined as far as I can tell. I set it to "this" thinking you might be extending the MovieClip class. 2. you weren't calling populate() 3. you don't need that third nested clip (k), in fact, you don't need the second one either
4. you were setting the created text field to sctnTxt_array[k]; which resulted in all of them being set to "contact" http://www.acmewebworks.com/admintool/images/xray_textfieldsCreated.png 5. After I got that straightened out, I could see with Xray that you weren't actually creating your textfields inside of the individual movieclips, they were all being created on "c"'s timeline. I set the value to a prop "mc" and used that when calling createTextField(). http://www.acmewebworks.com/admintool/images/xray_textfields_created_in_c.png 6. I eventually took out the J loop as it was creating multiple textfields with the same value http://www.acmewebworks.com/admintool/images/xray_textfields_created_in_clips_tooMany.png 7. moved the scope of sctnNm_array outside the populate method's scope so you'd still have it after it was done ;) http://www.acmewebworks.com/admintool/images/xray_textfields_created_in_clips_arrayScoped.png this seems to work: c = this.createEmptyMovieClip("c", 1); var sctnTxt_array:Array = new Array("news", "philosophy", "about us", "excursions", "rentals", "locations", "gallery", "links", "contact"); var sctnNm_array:Array = new Array(); function populate() { for (i=0; i<sctnTxt_array.length; i++) { var mc = sctnNm_array[i] = c.createEmptyMovieClip("sctnNm"+i, i); mc.createTextField("sctnNmTxt"+i, i, 10, i*20, 100, 30); var txt:TextField = mc["sctnNmTxt"+i]; txt.autoSize = true; txt.border = true; txt.text = sctnTxt_array[i]; } } populate(); Hth, John / www.osflash.org/xray On 1/20/06, cristian <[EMAIL PROTECTED]> wrote: > > Hello- I'm still having trouble trying to populating empty Text > Fields with another array of strings. I have looked through the > archives with no goal reaching luck. Any help would be appreciated. > > Thanks in advance > > xtianim > > This is my revised code that although continues with no syntax > errors, and still does not show anything in the swf created > ***this is the AS from the first frame of a test.fla > a section of a > class I'm trying to develop > > > //create a container called "c" > c = c.createEmptyMovieClip("c", 1); > /* > //////////////////////////////////////////////////////////////////////// > /////////////////////////// > //the developer created sctnTxt arrray > //////////////////////////////////////////////////////////////////////// > /////////////////////////// > */ > var sctnTxt_array:Array = new Array("news", "philosophy", "about us", > "excursions", "rentals", "locations", "gallery", "links", "contact"); > //trace(sctnTxt_array); > //////////////////////////////////////////////////////////////////////// > /////////////////////////// > //////////////////////////////////////////////////////////////////////// > /////////////////////////// > //////////////////////////////////////////////////////////////////////// > /////////////////////////// > /* > //within c create a new array called "sctnNm_array" of > (sctnTxt_array.length) number of empty movie clips > */ > function populate() { > for (i=0; i<sctnTxt_array.length; i++) { > var sctnNm_array:Array = new Array(); > sctnNm_array[i] = c.createEmptyMovieClip("sctnNm"+i, i); > /* > //populate each movie clip with an empty text field > */ > for (j=0; j<sctnTxt_array.length; j++) { > sctnNm_array[i][j] = c.createTextField("sctnNmTxt"+j, j, 10, j*20, > 100, 30); > sctnNm_array[i][j].autoSize = true; > sctnNm_array[i][j].border = true; > /* > //////////////////////////////////////////////////////////////////////// > //////////////////////////////////// > //////////populate the textfields with developer designated text > //////////////////////////////////////////////////////////////////////// > /////////////////////////////////// > */ > for (k=0; k<sctnTxt_array.length;k++){ > sctnNm_array[i][j].text = sctnTxt_array[k]; > } > } > } > } > /* > //////////////////////////////////////////////////////////////////////// > //////////////////////////////////// > //////////check it > //////////////////////////////////////////////////////////////////////// > /////////////////////////////////// > */ > sctnNm_array[0][1]; > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- John Grden - Blitz _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders