1 Reply Latest reply on Dec 1, 2010 4:27 PM by Flex harUI

    Can ToolTips be a super class?  Extend ToolTip?

    learner_doug Level 1

      I'm trying to simplify my tool tips, currently each one looks like this:

       

      public

       

       

       

       

       

      var owms1Tip:ToolTip;

       

      private function createBigTip(event:Event):void

      {

       

       

      var s:String = "1. Order enters COMIT from the CTS Web Center\n\n2. Assigned Staff queries COMIT Tracking for unassigned\n orders and assigns orders to an Order Writer\n\n(CLICK MILESTONE for more options)"

      owms1Tip = ToolTipManager.createToolTip(s, 110, 110,

       

      null, IUIComponent(event.currentTarget)) as ToolTip;

      owms1Tip.setStyle(

      "backgroundColor",0x0e21a4);

      owms1Tip.setStyle(

      "cornerRadius", 8);

      owms1Tip.setStyle(

      "fontFamily", "Verdana");

      owms1Tip.setStyle(

      "color",0xFFFFFF);

      owms1Tip.setStyle(

      "fontSize",12);

      owms1Tip.width=380;

      owms1Tip.height=128;

      }

       

      the subclass would include cornerRadius, fontFamily, color, fontSize. (eventually I'd like to populate the other attributes from an XML file.

       

      Thanks,

      Doug