array sort in flash
- Started
- Last post
- 42 Responses
- jkosoy0
Can I see what you've got James? Maybe another brain to pick at it could help...?
- j_red0
apologies jame, i thought you wanted to sort them by value - i'll look at it some more.
- JamesEngage0
'sorted' it... will post it up in a sec... bit dirty though I imagine!
- JamesEngage0
I did... does it work in Flash 6? No.
- caseyc0
James, I didnt realize that was Flash 7 only, here's a func to do it in 6. Blargh.
- JamesEngage0
function reportOrder(myArray) {
for (n=1; n
- JamesEngage0
grr
- caseyc0
You can do it like this bro:
myOrder = myArray.sort(8);
- JamesEngage0
function reportOrder(myArray) {
for (n=1; n
- instantok0
i wanna see!
hi jamie...
- JamesEngage0
it's James... I'm not a fecking CHAV!
- JamesEngage0
right... subject closed! sorted now... can stop posting how to sort an array now, as this is not what I was after.
THE END
- jkosoy0
ha. hi justin.
- JamesEngage0
oops!
- instantok0
haha...sorry i was actually saying hi to jkosoy (j for jamie)
thanks for the sort jumpoff
- jkosoy0
Not bad James. Only thing I don't like is the limitation between the numbers. Obviously easy to adjust but it'd be nice to make it uber universal.
I'll tinker with it when I'm a little less busy and see if I come up with anything.
Nice job.
- JamesEngage0
how do you mean limitation between the numbers?
- JamesEngage0
by the way it is for prerendering numbers before run time so speed not too important :)
- caseyc0
*Begin Arnold soundclip*
Yooou son of a bitch...
*End Arnold soundclip*
What I posted does not sort the original, it does exactly what you asked for, it "will create a new array that reports the order in which they exist"
Test before posting next time, ya heard!?
- jkosoy0
the -1 and the 1000. won't that insinuate that you won't have a number greater than 1000 or less than -1?