5 Replies Latest reply on May 25, 2009 1:36 PM by MediaMackenzie.com

    .slice() to copy an Array


      Hi All


      I am trying to use .slice() to copy an Array of Loaders (each with a jpg loaded in it), as follows:


      newArray = oldArray.slice();


      and it works, but the problem is, any changes I apply to one Array applies to both, as though .slice() had just copied a pointer to the same Array, but I was specifically told that .slice() would not exhibit that pblm. Before I just go back to loading the same images twice, is there something special about Arrays of Loaders or something else I might be missing?


      Thanks for your help!