Saturday, November 12, 2011

Alert with Label Link Component

<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" horizontalAlign="center" title="Order Successfully Created" textAlign="center" width="460" styleName="alert" height="110" verticalGap="15" color="black" shadowDirection="center" shadowDistance="10" >
  <mx:Script>
        <![CDATA[
    import mx.events.CloseEvent;
    import mx.managers.PopUpManager;
   
   
        public var  closeHandler:Function = null;
       
       
        private function clickHandler(evt:MouseEvent):void
    {
        var closeEvent:CloseEvent = new CloseEvent(CloseEvent.CLOSE);
            closeEvent.detail = 001;
            closeHandler(closeEvent);
        PopUpManager.removePopUp(this);

    }
        private function removeHandler(evt:MouseEvent):void
    {
       
        mx.managers.PopUpManager.removePopUp(this);

    }
          ]]>
  </mx:Script>
  <mx:Style>
    .alert{
color : #0f3177;
title-style-name : "alertTitle";
header-height:25;
drop-shadow-enabled: true;
drop-shadow-color :#d1ddf7;
background-color: #ffffff;
corner-radius :6;
header-colors : #90a4d1, #5970a0;
footer-colors : #9db6d9, #ffffff;
border-color : #5970a0;
}
  </mx:Style>
  <mx:HBox id="genId1281449230637_2" automationName="genId1281449230637_2AN">
    <mx:FormItem label="Order Id:" id="genId1281449230637_3">
      <!-- <mx:Label id="orderLabel" color="blue" selectable="true" textDecoration="underline" styleName="alert" click="clickHandler(event)" useHandCursor="true" mouseChildren="false" buttonMode="true" /> -->
       <mx:LinkButton id="orderLabel"    color="blue"   styleName="alert" useHandCursor="true" mouseChildren="false" click="clickHandler(event)"
             textDecoration="underline" fontWeight="normal"  />
    </mx:FormItem>
  </mx:HBox>
  <mx:Button id="btnOk" label="OK" click="removeHandler(event)" styleName="alert" fillColors="0xFFFFFF, 0xAAAAAA"/>
</mx:TitleWindow>

No comments:

Post a Comment