본문 바로가기

[Alert] css로 스킨 먹여보기.


1.Base는 어디서 줏어왔는데 기억 안남.

Alert
{
 roundedBottomCorners:true;
 color : #124332;
 background-color: #ffffff;
 header-colors : #73c7ea, #0156a9;
 header-height:19;
 drop-shadow-enabled: true;
 drop-shadow-color :#243322;
 corner-radius :15;
 border-style :solid;
 border-thickness:2;
 border-thickness-top:0;
 border-thickness-bottom:0;
 borderThicknessLeft:5;
 borderThicknessRight:5;
 border-color : #0156a9;
 footer-colors : #243322, #ffffff;
 title-style-name : "title";
 message-style-name:"messageStyle";  
 button-style-name:"AlertButtons";  
}

.title
{
 header-colors : #73c7ea, #0156a9;
 cornerRadius:4;
    highlightAlphas:0.59, 0.5;
    fillAlphas:1, 1, 1, 1;
    fillColors:#040404, #4c4c4c, #c60303, #ff4300;
    color:#ffffff;
    textRollOverColor:#ffffff;
    borderColor:#474747;
    themeColor:#333333;
    fontFamily:Arial;
    fontSize:11; fontWeight:bold;
   


.messageStyle
{
 
 
    letterSpacing:0;
    color:#333333;
    textAlign:left;
    fontFamily:Arial;
    fontSize:11;
    font-weight:normal;
    corner-radius :15;
}

.AlertButtons
{
    cornerRadius:4;
    highlightAlphas:0.59, 0.5;
    fillAlphas:1, 1, 1, 1;
    fillColors:#040404, #4c4c4c, #c60303, #ff4300;
    color:#ffffff;
    textRollOverColor:#ffffff;
    borderColor:#ff0000;
    themeColor:#0156a9;
    fontFamily:Arial;
    fontSize:11; fontWeight:bold;
}

Alert.show("테스트 경고창입니다.","테스트타이틀");

이런 모양이 나온다. 물론. 파란색 타이틀 바에 아이콘도 넣을 수 있고 타이틀 글자도 넣을 수 있다.

 [Embed(source="assets/alert1_icon.png")]
 private var BulletCritical:Class;
 [Embed(source="assets/alert1_icon2.png")]
 private var Icon2:Class;
  var alt:Alert = Alert.show("테스트 경고창입니다.","테스트타이틀", 4, null, null, Icon2);
  alt.titleIcon = Icon2;


Alert는 뜯어보면 public class Alert extends Panel.
즉 Panel을 상속받아서 만든것을 알 수 있다.
TitleBar도 있을꺼고 ControllBar도 있을 꺼고 Content Area도 있을 터.

그러면 아래처럼 아이콘을 박스를 벗어나서 그릴려면 어떻게 해야 할까.

alt.titleIcon에 넣어봤자. 아래처럼 나온다. 즉 y기준은 변해서 벗어나게 그려주지만
x는 원하는 위치가 아니다.
  var alt:Alert = Alert.show("테스트 경고창입니다.\n\n\n\n\n\n\n\n\n\n\n\n","테스트타이틀");
 alt.titleIcon = Icon2;

방법이 없을까.