ok, first I called the mx.controls function to create an object called my_video (which by the way is the same name as a MediaDisplay in my movie)
import mx.controls.MediaPlayback;
var my_video:MediaPlayback;
then load the xml file
menu_xml = new XML();
menu_xml.ignoreWhite = true;
menu_xml.onLoad = function(ok){
if (ok){ CreateMainMenu(380, 20, 0, this); }
};
Now once the file is loaded it should call the function CreateMainMenu
CreateMainMenu = function(x, y, depth, menu_xml){
GenerateMenu(this, "mainmenu_mc", x, y, depth, menu_xml.firstChild);
};
this in turn will call a function called GenerateMenu
GenerateMenu = function(container, name, x, y, depth, node_xml)
// variable declarations
var curr_node,curr_item,ynumber;
var curr_menu = emptymovie.createEmptyMovieClip(name, depth);
for (var i=0; i<node_xml.childNodes.length; i++) {
// item submenu behavior for rollover event
if (node_xml.childNodes*.nodeName == "interview"){
curr_item = curr_menu.attachMovie("listmenuitem","item"+i+"_mc",i);
curr_item._x = xnumber;
curr_item._y = ynumber;
ynumber = ynumber + 42;
curr_node = node_xml.childNodes*;
curr_item.txtbox.text = curr_node.attributes.textboxvalue;
curr_item.node_xml = curr_node;
curr_item.action = curr_node.attributes.action;
curr_item.variables = curr_node.attributes.movloc;
curr_item.onRelease = function(){
Actions[this.action](this.variables);
}
}
} // for
} // function
sorry for some of the dumb names but it’s my job security to make sure no-one else can decipher it 
curr_menu is just an empty movie created. It is only used to attach another movie to.
inside the for loop there is a movie being created for each entry in the xml file (using the param to position it)
the movie is called listmenuitem (its also called this in the library), this is a movie which contains a dynamic text box called txtbox
as you can see the txtbox value is being taken from the XML file, meaning the text for my buttons is coming from the XML file.
it then sets two values, one being the actions the other being the variables…here is a snippet of my XML
<interview textboxvalue="Text for button one" action="PlayMovie" movloc="mymovie.flv"/>
then it sets the onrelease function to use an object called Actions passing it the 2 values you just set
now how to make the actions work…
outside of the GenerateMenu function and before you load the XML file paste this code
Actions = Object();
Actions.PlayMovie = function(movie){
my_video.contentPath = movie;
}
you can see from my XML you’ll be calling the function in the actions object called playmovie passing it the movie param which is the url to your flv movie. this means when someone clicks one of your buttons you’ve created the my_video (mediadisplay) on your stage will change contentpath and show a different movie…
I got a lot of this from the Macromedia pdfs available on their site (well Adobe now)
and obviously a lot of it from Sens tutorials :thumb:
hope this help 