A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: sortOn with arrays

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    2

    sortOn with arrays

    Hey all quick question ... say I've got an array called activeArray

    I've pushed various movieclips to the array and used sort to sort the array A-Z

    If I now wanted to loop through the array and check if a property attached to each movieclip ... let's say that each movieclip looks something like player1.isOnline = true ... how would I loop through the array and bring the movieclips with the isOnline property = true to the front?

    I'm guessing I need to use sortOn? Oh and I've already removed any duplicate movieclips so I need to avoid adding anymore duplicates

  2. #2
    Senior Member
    Join Date
    May 2010
    Posts
    178
    could you able to show some of your code?


    poltuda

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center