How to Skin your Alert or ToolTip in Adobe Flex using actionScript?

By | December 26, 2010

The code below does this . Simply copy and paste the following code..

applicationComplete=”init()”>

Alert
{
color : #124332;
background-color: #ffffff;
header-colors : #243322, #243322;
header-height:19;
drop-shadow-enabled: true;
drop-shadow-color :#243322;
corner-radius :10;
border-style :solid;
border-thickness: 1;
border-color : #243322;
footer-colors : #243322, #ffffff;
title-style-name : “title”;
}
.myalertstyle
{
backgroundAlpha: 0.3;
backgroundColor: black;
borderAlpha: 0.3;
borderColor: white;
dropShadowEnabled: false;
}
ToolTip {
backgroundAlpha: 1.0;
fontSize: 21;
backgroundColor: #456789;
color: white;
cornerRadius: 20;
}

import mx.controls.Alert;
private function init():void
{
var alert:Alert;
alert=Alert.show(“hELLO “,”my Style”);
alert.styleName=”myalertstyle”;
}
]]>

Leave a Reply

Your email address will not be published. Required fields are marked *