PDA

Просмотр полной версии : архи важно HELP!!!!


ama2001
12.09.2002, 18:13
люди есть полее ввода текста,
в нем набирает ААА ИИИ РРР
потом мышой выделяем ИИИ, нажимаем на кнопочку,
в строку переменную str надо занести выделенное ИИИ...
Как сделать помогите... а...

RDA
12.09.2002, 18:17
Есть такая штука - Selection....

ama2001
12.09.2002, 18:28
Это я понимаю, но посли долгих эксперемнтов ничего не получается...

PInGWIN
12.09.2002, 19:09
Вот пример...

RDA
12.09.2002, 19:12
Не знаю может есть вариант и попроще......

this.createTextField("temp", 1, 10, 10, 200, 50);
this["temp"].wordWrap = this["temp"].multiline = this["temp"].border = true;
this["temp"].type = "Input";
this["temp"].variable = "txt";
///
this["temp"].onSetFocus = function() {
Selection.setFocus("this.txt");
this._parent.onEnterFrame = function() {
this.begin = Selection.getBeginIndex();
this.end = Selection.getEndIndex();
};
};
///
this["temp"].onKillFocus = function() {
delete this._parent.onEnterFrame;
};
///
this.createEmptyMovieClip("button", 10);
this["button"].beginFill(0xcccccc, 100);
this["button"].moveTo(150, 70);
this["button"].lineTo(210, 70);
this["button"].lineTo(210, 90);
this["button"].lineTo(150, 90);
this["button"].lineTo(150, 70);
this["button"].endFill;
///
this["button"].onRelease = function() {
trace(this._parent["txt"].substring(this._parent["begin"], this._parent["end"]));
};
///

PInGWIN
13.09.2002, 19:20
Дык дату создания файла смотри.... тогда я был еще молод и глуп...