-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathTextBox.as
More file actions
59 lines (47 loc) · 1.46 KB
/
TextBox.as
File metadata and controls
59 lines (47 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package tableManager.data
{
import eventMovie.ThumbnailEvent;
import flash.display.*;
import flash.events.*;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.utils.Timer;
public class TextBox extends MovieClip
{
private var target:MovieClip;
private var value:String;
public function TextBox(target_p:MovieClip,value_p:String="")
{
var textFormat:TextFormat = new TextFormat()
textFormat.font = CreatPage.target.Font;
textFormat.size = CreatPage.target.Size
textFormat.color = CreatPage.target.Color
if(CreatPage.target.Format == "en")textFormat.align = "justify"
if(CreatPage.target.Format == "fa")textFormat.align = CreatPage.target.AlignParag
var newTextField = new TextField();
newTextField.text = '-';
newTextField.defaultTextFormat = textFormat;
target = target_p
value = value_p
target.valueText.addEventListener(Event.CHANGE,changeTextBox_Fun);
FarsiInputCorrection.clear(target.valueText)
target.valueText.text = value
FarsiInputCorrection.setUp(target.valueText)
}
private function setValueText_fun():void
{
this.dispatchEvent(new ThumbnailEvent(ThumbnailEvent.THUMB_CLICKED,target.valueText.text));
}
public function reset():void
{
target.valueText.text=""
setValueText_fun()
}
private function changeTextBox_Fun(evt:Event):void
{
setValueText_fun()
}
}
}