Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
AW: [Flashcoders] Updated menuitem in menubar

AW: [Flashcoders] Updated menuitem in menubar

2004-03-09       - By Andr? Knuth

 Back
Reply:     1     2  

Answering myself:

function onEditMenuChange(eventObject:Object):Void {
   var aMenu = eventObject.menu;
   var aMenuItem = eventObject.menuItem;
   switch (aMenuItem) {
     case aMenu.setHistoryMark:
        aMenu.getHistoryMark.attributes.enabled true;
 
aMenu.modelChanged({eventName:"updateTree"});


The last line ist the most important one, it fires an event, that updates
the menu.

Hi there,

  I am changing a attribute of a menu(flash2004 component), like this:

  aMenu.getHistoryMark.attributes.enabled = true;

  that was enabled?lse before(set by dataprovider-xml). When I open
that
  menu again to see if the menuitem is enabled, it is still displayed
as disabled,
  but when I roll over the item it is shown as enabled. Is there a way
to
  manually update the menuitem so that it is being displayed
correctly?

  I tried:

  var aProvider = menubar.dataProvider;
  menubar.dataProvider = aProvider;

  which has a nasty sideeffect that the menu blinks as it is being
redisplayed.

Thanks in advance,
Andr? Knuth

=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:105989
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)


=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106424
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)




Earn $52 per hosting referral at Lunarpages.