1 package net.systemeD.controls {
2 import flexlib.controls.PromptingTextInput;
3 import flash.display.DisplayObject;
4 import mx.controls.Image;
6 public class PromptingTextInputWarning extends PromptingTextInput {
8 private var _image:Image;
9 [Embed(source="../../../embedded/warning.png")] private var warningIcon:Class;
11 function PromptingTextInputWarning():void {
15 override protected function createChildren():void {
16 super.createChildren();
18 _image.source = warningIcon;
21 addChild(DisplayObject(_image));
24 override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
25 super.updateDisplayList(unscaledWidth, unscaledHeight);
26 if (text && text.indexOf(';')>-1) {
27 setStyle('color',0xFF0000);
29 _image.x = width -_image.width -5;
30 _image.y = height-_image.height-3;
31 _image.toolTip = "The tag contains more than one value - please check";
32 textField.width = width-_image.width-5;