You've asked it to run once. On loader complete is a trigger event which happens once and then you run the function once. To run it for every instance you would have to use for each instance, which you should probably do in this case, your function will not pick the Sprite A correctly there.