A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: From one array into another

  1. #1
    Join Date
    May 2002
    If I have an array of strings and i want to put those strings onto another array that holds the instance names of dynamic text boxes, How could I take the strings from the first array and put them in to their corresponding indexes of the new array?

  2. #2
    Senior Member
    Join Date
    Feb 2002
    // first array
    myArray1 = new Array("box1","box2","box3");

    // second array to put first array into
    myArray2 = new Array();

    // place data from first array into second array
    myArray2[0] = myArray1[0];
    myArray2[1] = myArray1[1];
    myArray2[2] = myArray1[2]

    // OR... if you want to use a for() loop to do the same thing

    for (i=0;i<3;i++){
    myArray2[i] = myArray1[i];

    Hope this helps & gl!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center