fpixel
fpixel

Reputation: 1

Flex Alert Window Styling

I am trying to style the Alert window on an external file but I get the following warning and the style won't be applied, keep in mind that the Alert is being called from an external AS file as well so the code is not embedded in the MXML.

The CSS type selector 'Alert' was not processed, because the Alert was not used in the application.

Type alert in CSS selector 'Alert' must be qualified with a namespace.


Alert{
    color : #124332;
    background-color: #ffffff;
    header-colors : #243322, #243322;
    header-height:19;
    drop-shadow-enabled: true;
    drop-shadow-color :#243322;
    corner-radius :6;
    border-style :solid;
    border-thickness: 1;
    border-color : #243322;
    footer-colors : #243322, #ffffff;
    title-style-name : "title";
}

Upvotes: 0

Views: 2917

Answers (1)

J_A_X
J_A_X

Reputation: 12847

Every CSS file in Flex 4 must start with the default namespace:

@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";

In your particular case, you're not specifying a namespace on your Alert, try this:

mx|Alert{...}

As for the warning about it not being used, ignore that one. It's just a way for the compiler to warn about unused styles so that you can reduce filesize. If you want, you could always remove warnings that are CSS based with -show-unused-type-selector-warnings=false in the compiler options of your project.

Upvotes: 2

Related Questions