Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Blur Range/Pendulum-Alphamania
Generic behavior to emulate a Keystroke
Snap Shot Maker
Fast Start Projector
Text scrolling effect
E-mailExec 3 Pro
Setup Anim
Memory Info
Tristate button with caption
Setup Anim
MediaMacros Xtras Mall
 

 

 

Behavior Multi lists sorting

Added on 4/4/2001

 

Compatibilities:
D7 D8 Mac PC Script Shockwave

This item has not yet been rated

Author: EmmanuelNedelec

This behavior sorts as many linear lists as you wish ordering by one of them, at your choice

-- created by Emmanuel Nedelec e.nedelec@wanadoo.fr

-- parameters :
--   ListOfLists : a list of the several lists to sort
--     it can be for example :
--     [["Martin","Dave","John"],["Smith","Johnson","McRoy"],
--      [33,45,26]]
--   orderChoice : the rank of the list to use to sort
--      to continue the example, sorting by Name would be 2,
--      by age would be 3
-- return :
--   a new list of lists sorted as you wished

on MultiSort ListofLists, orderChoice
  
  set nbList = count (ListofLists)
  set mySorList = getAt (ListofLists, orderChoice)
  set myMax = count (mySorList)
  set newList = [:]
  repeat with i = 1 to myMax
    addProp newList, mySorList [i], i
  end repeat
  sort newList
  set newListList = []
  repeat with i = 1 to nbList
    add newListList, []
  end repeat
  repeat with i = 1 to myMax
    set myPos = getAt (newList,i)
    repeat with j = 1 to nbList
      newListList[j][i] = ListofLists[j][myPos]
      updatestage
    end repeat
  end repeat
  return newListList
end
  

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail