Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Flash Actionscript - Problem updating dynamic text in a menu
Old 07-04-2010, 10:36 AM Flash Actionscript - Problem updating dynamic text in a menu
Junior Talker

Posts: 1
Name: Devender Verma
Trades: 0
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:

Code:
_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
devji79 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Flash Actionscript - Problem updating dynamic text in a menu
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20872 seconds with 12 queries