Posted By

Paco on 10/06/08


Tagged

array


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Winkyboy
THEPWN3R


Array Function's


 / Published in: ActionScript 3
 

  1. function insertIntoArray( array:Array, itm, at:uint ):void
  2. {
  3. var i:uint = 2
  4. var b:Array = array.slice( 0, at );
  5. var c:Array = array.slice( at );
  6. b.push( itm );
  7. a = b.concat(c);
  8. }
  9. //test
  10. var a:Array = new Array( 0,1,2,3,5,6,7);
  11.  
  12. insertIntoArray( a, 4, 4 );
  13. trace( a );

Report this snippet  

You need to login to post a comment.