-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathTextBoxSender.as
More file actions
52 lines (48 loc) · 1.19 KB
/
TextBoxSender.as
File metadata and controls
52 lines (48 loc) · 1.19 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
package componentStatic
{//componentStatic.TextBoxSender
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.SoftKeyboardType;
import flash.text.TextField;
public class TextBoxSender extends ComponentManager
{
private var _textbox:TextBox;
private var valueTextMc:TextField;
public function TextBoxSender()
{
valueTextMc = Obj.get('valueText',this);
update();
ComponentManager.evt.addEventListener(ComponentManagerEvent.UPDATE,getUpdate)
}
protected function getUpdate(event:Event):void
{
update()
}
public function get text():String
{
return valueTextMc.text;
}
public function update():void
{
var value:String = ''
var oldValue:String
if(getObj(this.name)!=null && getObj(this.name)!='')
{
value = getObj(this.name)
oldValue = value
}
_textbox = new TextBox(this,value,SoftKeyboardType.DEFAULT)
_textbox.addEventListener(TextBoxEvent.TEXT,textBoxEvent_fun)
setObj(this.name,value)
}
protected function textBoxEvent_fun(event:TextBoxEvent):void
{
setObj(this.name,event.text)
}
public function rest()
{
//_textbox.setText('')
_textbox.setValueTextByeCod_fun('')
}
}
}