Просмотр полной версии : архи важно HELP!!!!
люди есть полее ввода текста,
в нем набирает ААА ИИИ РРР
потом мышой выделяем ИИИ, нажимаем на кнопочку,
в строку переменную str надо занести выделенное ИИИ...
Как сделать помогите... а...
Есть такая штука - Selection....
Это я понимаю, но посли долгих эксперемнтов ничего не получается...
Не знаю может есть вариант и попроще......
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"]));
};
///
Дык дату создания файла смотри.... тогда я был еще молод и глуп...
Работает на vBulletin ® версия 3.7.3. Copyright ©2000-2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Copyright © 1999-2008 Flasher.ru. All rights reserved.