Hi all,
Example: http://www.vermadesign.co.uk/?s
I’ve been experiencing a very frustrating issue that has had me stumped for the last few days.
I am developing a Flash based website using AS2 and am using XML files to feed in the content including the menu structure. The XML loading is working fine but I can’t seem to get the menu to work properly.
The menu uses dynamic text that is updated whenever the user clicks a menu item. The function that updates the menu is located in _root and is called via the menu button’s on(release). This function loads the XML file and then updates the dynamic text with statements such as:
_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";
.
The problem is that the menu items appear to update correctly but only retain their new values for about half-a-second. They then revert back to the default values. This means that the updating is being done correctly but there must be something that is causing all the dynamic text to change back. Could this have something to do with the order of events? How would I go about debugging this?
An example of what I mean is located at:
http://www.vermadesign.co.uk/?s
You will be able to see that the menu starts with the default values even though they have already been updated when the document loads. When you click on an option in the first panel, the updated values suddenly persist and the problem now moves to the second panel.
If you click the third option ‘our work’ in the first panel and then ‘architecture’ in the second panel repeatedly, you can see the third menu panel does have the new values populated but then reverts back to the default values during the animation.
I would really apreciate any help you can give me as I just can’t figure out what is going on. I am also happy to PM the source if required.
Thanks