Help with dynamic text in a menu

Hi,

Link to site: http://vermadesign.co.uk/?s

I’ve been trying to create a flash website menu that updates the menu text via an xml file. The problem I’m experiencing is that when I update the dynamic text in the menu, it doesn’t seem to go through.

I know I am referencing the dynamic text correctly as when I run the swf for the first time, I briefly see the correct text for about half-a-second before it is replaced by the default dynamic text. There is something that is overwriting the new text with the default values but I cannot see what is causing it.

I am changing the dynamic menu text in _root although the dynamic text exists in nested movie clips i.e. ‘_main.menu_mc.menu_panel_1.menu_button_1_1.menu_button_text’.

The code in _root is:

_root.menu_mc.menu_panel_1.menu_button_1_1.menu_button_text.text = "home";
_root.menu_mc.menu_panel_1.menu_button_1_2.menu_button_text.text = "our approach";
_root.menu_mc.menu_panel_1.menu_button_1_3.menu_button_text.text = "our work";
_root.menu_mc.menu_panel_1.menu_button_1_4.menu_button_text.text = "news";
_root.menu_mc.menu_panel_1.menu_button_1_5.menu_button_text.text = "about us";
_root.menu_mc.menu_panel_1.menu_button_1_6.menu_button_text.text = "contact us";

When I move this block of code into the last frame of menu_panel_1, the items are updated but only after the animation is complete. Even then, not all update as the first item remains as the default.

Is there anybody that could help me figure out why this is happening or explain how would I go about debugging the error?

I’m happy to send attach the files or send via PM if needed.