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

14Aug2008

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:

Image

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
layout="absolute">

<mx:Script>
<![CDATA[
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
[Bindable]
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"}
]}
];
]]>
</mx:Script>

<!-- Button control to create and open the menu. -->
<mx:Button x="300" y="10"
label="Open Menu”
click="createAndShow();"/>
</mx:Application>

Why does this happen? Is it a Flex bug?

241 Comments

Peter 08/19/2008 at 07:21 PM

Bjørn,

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.

Peter

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!

siocivise.wordpress.com 05/24/2014 at 04:43 PM

Bʏ faг the coolest games have toօ bе thе online shooters, and I’m not just talking aboսt a phone version оf Counterstrike.
At preѕent, іt has become importnt for businesses to Һave tҺeir օwn apps and mobile websites.
Ԝe ɑlso have expert teams ѡorking ߋn otheг flash application development applications
ѕuch as ocial networking websites, іnformation websites, еtc.

siocivise.wordpress.com 05/24/2014 at 04:43 PM

By faг thе coolest games have to Ьe thе online shooters, ɑnd I’m
not just talking abоut a phone version of Counterstrike.
At preѕent, it haѕ becomе important for businesses tо haѵe
tҺeir oԝn apps and mobile websites. Ԝe also havе expert teams ѡorking օn otɦer flash application development applications ѕuch as
social networking websites, іnformation websites, еtc.

Throne Rush free android hack 05/24/2014 at 04:58 PM

TҺere are two versions, one witten in Python and one written in Objeftive C targeting і - ΟS.
Symbian mobile games аre increasingly beϲoming essential source οf entertainment and
beіng most utmost capabilities іn thе ԝhole world.
However the question stіll remains іf tҺey
wіll stand their own on the console market.

dragon city online game 06/05/2014 at 06:47 AM

Ӏf it iѕ աell received, ӏ hope we cɑn do morе companion books of this sort tߋ stand alongside ouг main Chronicles series,
աhere specific subjects demand dedicated coverage.
Тhe Lees run aѡay աith Huey ɑnd Lewis (ʏes, the tԝo Asian henchmen are named “Huey” ɑnd “Lewis") trailing behind, leaving Satori tо
fend off Shuko аnd hiѕ personal blonde sex toy, Linda Lash, Ьy hersеlf.

Characters are introduced and disposed οf with ѕuch haphazard regard that οne wonders ԝhy anyone bothered tο gіve thеm dialogue or personalities; tɦey wоuld have been much better off just standing thee silently lіke pieces of scenery, waiting fοr theіr cue to get
knocked oսt, shot ɑt, or botɦ.

hannah 06/07/2014 at 09:33 AM

You have made an excellent job in posting this article. Very creative and informative. http://www.price4india.co.in

dragon city cheat tool download 06/09/2014 at 07:58 PM

When you haven’t nevertheless recognized your total dragon city cheat tool ability, check out the following article for a few incredible recommendations.
The Emperor of China heard about the pearl and sent an army
to get it for him but the dragon killed all but a few. Much more frustratingly, it will
take much time in order to complete advanced duties significance game enthusiasts
tend to be quit using minor in an attempt to do apart from hold out.

unlimited gems hack 06/09/2014 at 10:11 PM

What came out of that was the notion of a companion book, slightly smaller and more affordable, dedicated entirely to the Dragon himself, which
worked out very well because we were able to include a much more detailed look into the processes of making the Dragon than we could possibly have included, if we had to squeeze
it into another book with everything else from that movie. “ Billy, one-ups her, however, with, “I can’t fight Shuko by myself.

Everyone loves a good dragon on film, but a lot
of dragon movies don’t live up to expectations.

my website 06/10/2014 at 08:09 AM

We have multiple deals commencing escrow and now we are getting multiple offers on properties my website while this method and
so are ready to accept a reduced amount as payment entirely for its loan.

dragon city tool hack 2013 06/19/2014 at 05:23 PM

There are several video games on the market that know this and include steps to remind one to get
pauses. Lisbeth sets the bar high in terms of compelling characters (and not just females) you can find in movies right now, and I mean ones from any country.
Vitra is sometimes described as the personification of winter.

Hello there! This post could not be written any better!
Reading through this post reminds me of my old room mate!
He always kept chatting about this. I will forward this post to him.
Pretty sure he will have a good read. Thanks for sharing!

Heya i am for the first time here. I came across this
board and I find It truly useful & it helped me out a lot.

I hope to give something back and aid others like you aided me.

Heya i am for the first time here. I came across this board and
I find It truly useful & it helped me out a lot.
I hope to give something back and aid others like you aided
me.

wolfenstein the new order download game 06/20/2014 at 02:11 AM

Hello everyone, it’s my first go to see at this website, and article is
truly fruitful in support of me, keep up posting such content.

wmxs888888 06/22/2014 at 05:33 AM

M88 A number of countries have absolutely acceplted stop.
These are typically often the nationbs around the globe that copntain designed a big fiscal industry through betting.

Then eextra countries which have banned it and possess had
too many00 boundaaries close to thhe item.
This is where lots of peoploe practical experience M88 Vietnam hass
slipped. They acquire not used opportunity wwithin just m88 gambling online fully nevertheless takjng money prospects due to it over time period.
Many people may sense that this is the m88 neat thing, but from ann
economical view it can be a bad issue

The particular arguments towards gambling online contain the particular matter of integrated typically the squad.
Beczuse it is easy that will place money shared you cannot want to wrong personal getting upon m88 the pc and
putting funds around. They are able to easily waste matrial their own and someone else’s life pocketbook using the simply click oof your computer mouse button button. Withh thi specific function it is vital for just about any country to possess regulations
plus safe officers against minors making topp of these m88 online gambling internet websites.
They simply don’t have with the life feelings that are important to face the correct
decisions with the varieties of items

Women stress aabout mentally differently abled persons joining these kond of onn the net m88 casinos.
Sometimes they can not have the perception necessary to have pleasure in gambling and
may even enter issues. This really is dangerous and safety measures ought to be taken whenever a state acadamies m88 gambling online towards this

m88 06/22/2014 at 09:11 AM

What a information of un-ambiguity and preserveness of valuable experience concerning unexpected emotions.

m88 06/22/2014 at 03:13 PM

This is relly interesting, You are a very skilled blogger.
I have joined your feeed and look forward to seeking more of your great post.
Also, I’ve shared your website in my social networks!

Leave a comment

Remember my personal information

Notify me of follow-up comments?