function for order of an array
- Started
- Last post
- 13 Responses
- Engage
anyone have a simple function that will create an array based on the order of a array... eg.
origArray = (100,40,50,10)
would return an array liketheOrder = (3,1,2,0)
anyone?
- UndoUndo0
which language?
- Engage0
don't worry... was actionscript.. .but i've hacked one together
- Witt0
i'm looking for that myself - to arrange random sort of pictures, eg?
- Engage0
bookOrder =new Array("VOID");
//bookWidth= new Array (VOID , 100,40,50,10);
whatChoice=-1
for (n=1; n < bookWidth.length; n++){
lastSize=10000for (m=1; m
- Engage0
bookOrder =new Array("VOID");
//bookWidth= new Array (VOID , 100,40,50,10);
whatChoice=-1
for (n=1; n
- Engage0
bookOrder =new Array("VOID");
//bookWidth= new Array (VOID , 100,40,50,10);
whatChoice=-1
for (n=1; n
- Engage0
SOD IT!
- Witt0
you almost made it invisible again.
- CyBrain0
What's going on there? Too much text?
- UndoUndo0
nt doesnt like code
- UndoUndo0
you could copy your array into another array and then use the sortOn() function to cange the order.
comparing the first and second arrays would tell you what position the element was in before the sort
- blaw0
"The definition of insanity is doing the same thing over and over and expecting different results."
~ Benjamin Franklin
- Witt0
"The definition of insanity is doing the same thing over and over and expecting different results."
~ Benjamin Franklin
blaw
(Oct 16 06, 12:34)
--------------------------------ahahah! promote this man right now!
* checks if quotes applies to self.