Flex Strangeness - Part One: Setting openDuration to 0 on Menu will break Alert.show()


After getting some complaints that the tween effect when displaying a menu in Flex looked ‘flex-default-n00bish’ I went on a quest to remove it.

I found out that I could set the duration of the tween to zero by doing a menu.setStyle("openDuration", 0) - thus removing the effect. That worked fine, but later I noticed that an Alert in my application didn’t show anymore. It turned out that it was the style change on the menu that caused this.

What happens is that the whole application is blurred - but no modal dialog is shown. So, the whole application is freezed. This is how it looks on my machine:


Check it out for yourself here (source view is enabled btw). Just click the menu button, and then select any menu item.

Here’s the complete code (mostly copy’n’paste from the flex docs, I’ve only added the setStyle and menuHandler).

<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml

import mx.controls.Alert;
import mx.events.MenuEvent;
import mx.controls.Menu;

// Method to create an Array-based menu.
private function createAndShow():void {
// The third parameter sets the showRoot property to false.
// You must set this property in the createMenu method,
// not later.
var myMenu:Menu = Menu.createMenu(null, menuData, true);
myMenu.setStyle("openDuration", 0); // setting openDuration to 0 will break the Alert.show() below

myMenu.show(10, 10);
myMenu.addEventListener( MenuEvent.ITEM_CLICK, menuHandler);

private function menuHandler( ev:MenuEvent ):void
Alert.show("Are you sure you’d like to click this menu item?”, “Are you sure?”, Alert.YES|Alert.NO|Alert.CANCEL, this );

// The Array data provider
public var menuData:Array = [
{label: “MenuItem A”, children: [
{label: “SubMenuItem A-1”, enabled: false},
{label: “SubMenuItem A-2”, type: “normal"}
{label: “MenuItem B”, type: “check”, toggled: true},
{label: “MenuItem C”, type: “check”, toggled: false},
{type: “separator"},
{label: “MenuItem D”, children: [
{label: “SubMenuItem D-1”, type: “radio”,
groupName: “g1"},
{label: “SubMenuItem D-2”, type: “radio”,
groupName: “g1”, toggled: true},
{label: “SubMenuItem D-3”, type: “radio”,
groupName: “g1"}

<!-- Button control to create and open the menu. -->
<mx:Button x="300" y="10"
label="Open Menu”

Why does this happen? Is it a Flex bug?


Peter 08/19/2008 at 07:21 PM


I believe this was fixed in Flex 3. I was able to reproduce the bug (and your workaround) in Flex 201 Hotfix 3, but not with the Flex 3 SDK.


Bjørn 08/20/2008 at 08:17 AM

Thanks for looking into it Peter :-)

DegoNouloum 11/03/2011 at 12:02 AM

kamagra gel 100 mg kamagra 100mg en sachet
kamagra oral jelly kamagra en france
kamagra achat ligne
commander kamagra vente kamagra france
kamagra en gel kamagra le moins cher
comprar priligy precio priligy andorra
levitra generico forum 6eT 7Xyy
priligy gY3 dv2
cialis donde comprar zvk aVa4
comprar levitra en espana eZ1 7Xyy

Exhistsit 11/28/2011 at 03:58 PM
Effedkekbiz 12/07/2011 at 12:51 AM

<a href=http://comunidad.terra.com/comentarios/index/id/300482/user/Propecia>finasteride venta</a> 1E <a href=http://comprar-propecia-1mg.over-blog.es>online propecia</a> Ck <a href=http://comprare-propecia-1mg.over-blog.it>vendita propecia</a> XB <a href=http://djhhjh.tigblog.org>propecia acheter</a> yxn <a href=http://propecia-bestellen.over-blog.de>propecia rezeptfrei</a> ew

Hollyduth 01/11/2012 at 03:44 PM

Appreciate the great web page. I like your current design and style.
When it comes to how People in america watch Barack obama going into the newest 12 months, there appears to end up being little or no nature regarding Auld Lang Syne. Instead, based on the fresh Washington Whispers poll, many voters aren’t forgetting what they dislike about Barak and want him or her from workplace.

In your Brand-new Year’s opinion poll, any time requested just what media function these people fear many about Next year, Us citizens by way of a border of two-to-one stated Obama’s reelection­. Just 07 percent stated these people fear your Democrat won’t earn a second time period, although Thirty-three % mentioned these people fear four more decades Where To Buy A Dissertation.

Pharmk796 03/30/2012 at 10:25 AM

Hello! gekfegd interesting gekfegd site! I’m really like it! Very, very gekfegd good!

Pharmf375 03/30/2012 at 10:26 AM

Very nice site! cheap viagra

Pharmf973 03/30/2012 at 10:26 AM
cialis 04/04/2012 at 11:20 AM
cialis 04/04/2012 at 05:45 PM
Viagra 04/06/2012 at 09:39 AM
cialis 04/10/2012 at 04:11 AM
viagra 04/17/2012 at 06:21 PM
viagra 04/18/2012 at 07:38 PM
viagra 04/23/2012 at 12:04 PM
viagra 04/28/2012 at 04:28 PM
viagra 05/15/2012 at 08:28 PM
viagra 05/16/2012 at 11:28 PM
fast 05/17/2012 at 06:14 PM
viagra_online 05/17/2012 at 06:14 PM
free_viagra 05/21/2012 at 04:05 PM
Pharme44 06/05/2012 at 06:38 PM

Hello! ebgabge interesting ebgabge site! I’m really like it! Very, very ebgabge good!

Pharme448 11/11/2012 at 09:47 PM

Hello! keeedgk interesting keeedgk site! I’m really like it! Very, very keeedgk good!

Pharme80 05/07/2013 at 04:36 AM

Hello! fcfdkcg interesting fcfdkcg site! I’m really like it! Very, very fcfdkcg good!

brahtriannyub 08/28/2013 at 02:22 PM

<a href=http://cheapviagrapillsesl.com/#1>viagra</a> <a href=http://cheapviagrapillsvivt.com/#1>viagra</a> <a href=http://viagraonlinegenericth.com/#1>viagra online</a> <a href=http://cheapcialisgenericsybf.com/#1>cheap cialis</a> <a href=http://genericcialispricegnf.com/#1>generic cialis</a> <a href=http://cialisonlinepillsgkd.com/#1>cialis pills</a> <a href=http://genericviagraonlinejvrg.com/#1>viagra online</a> <a href=http://buyviagraonlinertvr.com/#1>buy viagra</a> <a href=http://genericcialisonlinevsdk.com/#1>generic cialis</a> <a href=http://cialisonlinepricesrj.com/#1>cialis price</a>

sarliarmaue 08/29/2013 at 11:37 AM

<a href=http://cheapviagrapillsesf.com/#1>viagra</a> <a href=http://genericcialisonlinevsdt.com/#1>cialis</a> <a href=http://cialisonlinepricesrg.com/#1>cialis</a> <a href=http://viagraonlinegenerictsf.com/#1>generic viagra</a> <a href=http://buyviagraonlinewrv.com/#1>viagra online</a> <a href=http://genericviagrapricevth.com/#1>viagra</a> <a href=http://cialisonlinepillssrgv.com/#1>cialis</a> <a href=http://cheapcialisonlinesgd.com/#1>cialis online</a> <a href=http://genericviagrarbs.com/#1>generic viagra</a> <a href=http://viagrapricesapf.com/#1>viagra price</a>

MooriaPempoombj 08/30/2013 at 10:41 AM

<a href=http://buyviagragenericviagrarth.com>generic viagra</a> <a href=http://viagraonlinewithoutprescriptionbyy.com>viagra online without prescription</a> <a href=http://cialisonlinegenericcialisisj.com>cialis generic</a> <a href=http://ordercialisonlinecialisybi.com>online cialis</a> <a href=http://cialisonlinesya.com>cialis</a> <a href=http://cialispriceschu.com>cialis price</a> <a href=http://viagraonlineahc.com>viagra</a> <a href=http://cheapviagrabfh.com>viagra</a> <a href=http://genericcialisvkq.com>generic cialis</a> <a href=http://cheapcialisaun.com>cialis</a>

Jareesitewo 10/15/2013 at 08:58 AM

http://onlinefrancesvh0oz8gl0.lo.gs/ viagra combien http://onlinefrancebrkazx75.lo.gs/ viagra le top http://onlinefrancesv6npvlwo4a.lo.gs/ viagra schokolade http://onlinefrancebj3f5n1ht.lo.gs/ viagra les alternatives http://onlinefrancebxzwr4k2x.lo.gs/ viagra a vendre quebec http://onlinefrancecbuh1xqf.lo.gs/ viagra testosterone gel http://onlinefrancebrkazx75.lo.gs/ viagra pour femmes http://onlinefrancev25326aa.lo.gs/ viagra pour femme site http://onlinefrancebxfmczf2.lo.gs/ viagra doesn’t always work http://buyonlinefrancejxcniz.lo.gs/ viagra pharmacie sans ordonnance http://onlinefrancexsayft75ll.lo.gs/ viagra pour femme en ligne http://onlinefrancebj3f5n1ht.lo.gs/ viagra philippines makati

enganodedvt 10/25/2013 at 02:16 PM

The best prices can be found by means of online offers to viagra |,Anybody can enjoy low price of buy generic viagra .,Most online stores will guarantee you the viagra price from foreign companies may put you at risk.,My wife is wondering if cheapest viagra will ship fast and safe.,There are several ways to buy cheapest viagra brand and generic product?.,of real pharmaciesWith offers from online pharmacies you can viagra no prescription when you are done analyzing cost savings to get the best,In relation to a meal, should viagra prescription pills quoted here are amazing,Canadian Pharmacy.Add more heat into your sexual aspect. Read cheap viagra you want to compare costs from pharmacies

Menointuimeceyl 11/23/2013 at 02:43 AM

Is taking order viagra online so that you can ease symptoms while accessing excellent,Heat up your body with the newest product of buy discount viagra online for details., Read on generic viagra online at the lowest price, Bookmark this site for buying generic viagra online and have multiple orgasms?|, Want to control your ED problems now? You can at buy online viagra through this portal deliver your treatment at affordable, Everyone can afford to cheapest cialis from reputable pharmacies,Check expiration dates when you cialis professional in the price chart published on this site, prices are available from pharmacies online that want you to cialis pills for sale from Canada to gain your trust., Anybody can enjoy low price of buy cialis generic online . Order now!, Be smart enough. Read buy cheap cialiscialis price ., Compare the price of

TiereEnritokl 11/24/2013 at 06:23 PM

Big savings on retail prices available here for your <a href=http://viagraonlinewithoutprescriptionhz.com>buy viagra online no prescription</a> from sites that don’t post info about their company., the cheapest pricesBigger companies offer free shipping when you <a href=http://viagraonlinewithoutprescriptionol.com>viagra sale</a> are so much better online. Check this out, Are there any side effects in taking <a href=http://viagraonlinewithoutprescriptionrtc.com>female viagra</a> includes information. See the ED natural treatment options.|, If prices for <a href=http://viagrawithoutprescriptionviagrasamplessv.com>order viagra online</a> , you can buy medication from home., Are there harmful side effects if I take <a href=http://buyviagragenericviagravry.com>viagra</a> ., Forget about waiting at the store for <a href=http://buyviagraonlinefemaleviagrayvu.com>buy cheap viagra</a> about your problem., Enjoy effective treatment when you <a href=http://cialisprofessionalcialis20mgbty.com>cialis professional</a> makes a trip to the pharmacy a thing of the past. Best meds, People should shop online and enjoy the lowest <a href=http://cialistadalafilcialisreviewsdub.com>cialis.com</a> at competitive prices when you purchase from known online, to cut rates A single chart has the lowest prices for the usual <a href=http://cialisukcialissoftag.com>generic cialis</a> at economical prices if you purchase from trusted online, Receive low prices when you <a href=http://cialisukcialissoftarry.com>cialis 20mg</a> from reputable pharmacies, Your privacy should be safeguarded when you <a href=http://freecialiscialissalestrh.com>cialis 20mg</a> to fill your pet medications., You’ll get excellent deals when you <a href=http://freecialiscialissaleyce.com>free cialis sample pack</a> ., Compare sales and discounts to

GawplOplely 01/07/2014 at 08:03 AM

When looking to cheap cialis generic .,Has your cialis online to minimize specific symptoms, Can I buy cialis daily from online pharmacies, Special offers can help you buy cheap cialis at a cheaper price?, Pay lower prices when you cialis tadalafil side effects when you are buying it online., If my online order viagra to get the best value possible,When you buy a drug online at low price of free viagra , an effective treatment, at greatly reduced prices, People with low incomes are likely to buy generic viagra online at greatly reduced prices, you need an effective treatment option, you should definitely viagra online . ED problems quickly resolved!, When you viagra on line help?, .You can easily

Pharmd685 01/24/2014 at 01:59 AM

Hello! efdkkfe interesting efdkkfe site! I’m really like it! Very, very efdkkfe good!

Pharmk447 01/24/2014 at 08:58 PM

Hello! bdkddkb interesting bdkddkb site! I’m really like it! Very, very bdkddkb good!

Pharmb963 01/31/2014 at 03:14 AM

Hello! ddbgeaa interesting ddbgeaa site! I’m really like it! Very, very ddbgeaa good!

Leave a comment

Remember my personal information

Notify me of follow-up comments?