Transitions between swf and XML menu

[size=2]I am currently using the techniques from the tutorial to create my flash web site.

http://www.kirupa.com/developer/mx2004/transitions.htm

I would like to incorporate the XML menu into this site. My problem is the action script that goes to each button. I am unsure how to incorporate this into the XML menu.

Here is the action script that currently goes to the button inside the main movie:

[/size][font=Times New Roman]on (release) {

if (_root.currMovie == undefined) {

_root.currMovie = “work”;

container.loadMovie(“work.swf”);

} else if (_root.currMovie != “work”) {

if (container._currentframe >= container.midframe) {

_root.currMovie = “work”;

container.play();

}

}

}

[/font][size=2]how would I incorporate this in the XML menu so my movie would roll back out between transitions?

[/size]