XML gallery question

Is it possible to have slide-specific buttons load with each slide that when clicked will, for example, load a new slide from a separate array?

Thanks for any suggestions.