You can't
really track dynamically indexed images without having some sort of categorization.
No really, you can't.
PHP Code:
enum IMAGE {
BACKGROUND,
ICONS,
HEARTS,
KEYS
}
hideimgs(IMAGE.HEARTS*200,IMAGE.KEYS*200 - 1);
I mean if you find a better way, let me know, but that's how I do it.