Dynamically created flash buttons with XML text?

Hi,
I have a situation where i have a hybrid site of flash and HTML and am using SWFobject to embed flash movies in different divs based on clicks from the nav bar. This is a recreation of an all flash site that needs to be changed in this manner so its text can be searched and to reduce maintenance time.

what i’d like to do is create buttons on the fly based on the number of nodes in an XML structure which would indicate how many buttons will appear.

then using that schema, use the XML text as the text which appears in the button… have any of you done this before or seen it done before?

is this even possible? any help or ideas are much appreciated.

Thanks,
Ian