A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: find last object in array

  1. #1
    Senior Member creekmonkey's Avatar
    Join Date
    Jul 2006
    Posts
    121

    find last object in array

    I have an array of objects. I need to find the last object in the array and tell it to do something. How do I fins the last object in the array.

    Does the findLastValue(value) function do this? If so can someone explain to me how this function works?

  2. #2
    Senior Member kusco's Avatar
    Join Date
    Nov 2001
    Posts
    681
    You can use the "top()" method

    which is the same as .. array[array.length-1]

    findLastValue searches for a particular value, starting with the last item on the array and searching backwards. It returns the index if found, otherwise returns -1
    Cheers,
    kusco
    (3DFA Support Team)

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