Fix compiler problem with ambiguous VideoEvent
[potlatch2.git] / net / systemeD / controls / PromptingTextInputWarning.as
1 package net.systemeD.controls {
2         import flexlib.controls.PromptingTextInput;
3         import flash.display.DisplayObject;
4         import mx.controls.Image;
5
6         public class PromptingTextInputWarning extends PromptingTextInput {
7
8                 private var _image:Image;
9                 [Embed(source="../../../embedded/warning.png")] private var warningIcon:Class;
10
11                 function PromptingTextInputWarning():void {
12                         super();
13                 }
14
15                 override protected function createChildren():void {
16                         super.createChildren();
17                         _image = new Image();
18                         _image.source = warningIcon;
19                         _image.width = 16;
20                         _image.height = 16;
21                         addChild(DisplayObject(_image));
22                 }
23
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);
28                                 _image.visible=true;
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;
33                         } else {
34                                 setStyle('color',0);
35                                 _image.visible=false;
36                         }
37                 }
38         }
39 }