createTextField()
Returns
TextField - Flash Player 8 returns a reference to the TextField object that is created. Flash Player versions earlier than 8 return void.

If your using a player earlier then flash 8 then your problem is createTextFeild does not return a reference to that newly created TextField

try this below


for (j=0; j<sctnTxt_array.length; j++) {
c.createTextField("sctnNmTxt"+j, j, 10, j*20, 100, 30);
sctnNm_array[i][j] = c["sctnNmTxt"+j]
sctnNm_array[i][j].autoSize = true;
sctnNm_array[i][j].border = true;

}

John

From: cristian <[EMAIL PROTECTED]>
Reply-To: Flashcoders mailing list <flashcoders@chattyfig.figleaf.com>
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] revised 5:34:18 PM EST Q: populating Text Fields innested Array Date: Fri, 20 Jan 2006 01:19:10 -0500

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

_________________________________________________________________
Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The new MSN Search! Check it out!

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to