Is It Possible? AS via XML

Curious - is it possible to control actionscript via xml. for example, in the Kirupa XML Photo Gallery with Thumbnails - would it be possible to add something in the xml to basically say “when ‘thumbnail 4’ is pressed do this: _root.gotoAndStop(7);” ?

I remember coming across some threads along these lines along time ago, but i can’t find them…