use the attach code option to display code in this forum.
and when images[k+1] is released, it doesn't know it has any
relationship to the value that k has when your onRelease is
defined. assign a property of images[k+1] to store the value of k
and use that property in you onRelease handler.