Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1047495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:18:37+00:00 2026-05-16T16:18:37+00:00

I am using Flex 4 and running into some problems displaying a simple alert

  • 0

I am using Flex 4 and running into some problems displaying a simple alert box. The alert box shows up, but the text seems to be the same color as the background. I know the text is there because if I mouse over in the alert box window to roughly where the text would be, I can see the cursor change. And when I double click and copy-paste into notepad, I can see the message. But the message, the button text, the message box title don’t show up.

The relevant code in my project is as follows

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:s="library://ns.adobe.com/flex/spark" layout="absolute"
initialize="{initialiseFlex()}"  backgroundGradientAlphas="[1.0, 1.0]"
backgroundGradientColors="[#FFFFFF, #FFFFFF]"
xmlns:ns2="keyboard.*" xmlns:ns1="com.adobe.flex.extras.controls.*" 
minHeight="864"  minWidth="1024" verticalScrollPolicy="off" width="1024">

<mx:Script>
            <![CDATA[
                    import mx.binding.utils.BindingUtils;
                    import flash.net.sendToURL;
                    import mx.utils.URLUtil;
                    import mx.managers.IBrowserManager;
                    import mx.managers.BrowserManager;
                    import mx.controls.Alert;

            ]]>
    </mx:Script> 

    <mx:Style>
            Alert {
                    titleStyleName: "alertTitle";
                    message-style-name: "alertMessage";
                    buttonStyleName: "alertButton";
                    background-color: #ffffff;
                    header-colors : #F4800E, #F4800E;
                    border-color : #F4800E;
                    corner-radius :6;
                    font-anti-alias-type:advanced;
            }
            .alertMessage {
                    fontSize: 20;
                    color: black;

            }
    </mx:Style>

<mx:Button click="Alert.show('From inside mxml')" 
enabled="false" x="580" y="440" label="Sign Out" id="btnSignOut" fontSize="24" 
labelPlacement="right" color="#F4800E" />

I have tried various things such as removing all the style information (the alert box shows up as bluish box, but again the text is the same color and hence invisible). I have removed all the backgroundgradientcolos and alphas from the application tag. etc. etc. I have changed the “.alertMessage” to “alertMessage” in the style part. But no matter what, the message text, title and button text in the alert box is always invisible. I know the text is there, as I said, because I can mouseover the alert box and see the cursor change, and then double click and copy/paste the text.

I have a suspicion that this is related to another problem I am having in the same project described here Autocomplete in Flex 4.0 not displaying items in dropdown list

Both of these controls seem to have text that is invisible, as if the text color is set the same as the background. I have tried to look for other style files, theme files or something in the project that would be responsible for setting these colors. But couldn’t find any. The project is relatively simple with one mxml, 3 “.as” files, one of which has validation logic and the other one has a wait anmiation. The third one has business logic code, but nothing to do with colors or themes. The other controls in the project – text boxes, buttons, datagridsl, panels all work fine. Its the autocomplete box and the alert box that seem to not want to display text that is there.

Any ideas or hints of what might be the cause of the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:18:38+00:00Added an answer on May 16, 2026 at 4:18 pm

    Ok, turns out the project was a Flex 3 project that was imported into Flex 4. It works where it does and breaks down where it doesn’t. I created a simple Flex 4 project with an alert box and it worked. I slowly moved all my code across to this project and it worked. It gave me a warning about the styles tag about not being able to use or something like that. I just removed all of the style tags and it worked fine. It doesn’t look the same, so I have to fiddle with it a bit more, but at least the text showed up. So something to do with the themes and the Flashbuilder compiler using them at compile time.

    All I have to say is what a crappy tool. If the import didn’t work, it should have failed completely ages ago. I searched and searched for any projects files or code files that were related to css or styles or themes. But clearly it was using something that was independent of my project to control some tiny part(s) of my project. The parameters of controls in my project were essentially dependent on some environmental/ide factors. What a pain to debug.

    Thanks for the help though guys.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Flex and Bison for a parser generator, but having problems with the
I'm using the Mate framework for Flex and communicating with a server running C#.
Using Flex Builder 4.5 with rails running on localhost on a brand new MacBook
I have an application running on flex and php, connected using amfphp, i added
I'm using BlazeDS to remote some Java objects that I'm consuming in a Flex
I'm using FDT 3 enterprise with Flex 4.5 SDK on Mac OSX Running works
I've got Flex Builder 3 running on a Mac. I'm using the Flex 3.2
I am running Flex Builder on a Mac using the Flex3.6A compiler. I have
I've been running into this problem with Flex for nearly a year, and each
I have a relatively simple lex/flex file and have been running it with flex's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.