Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript (http://www.flasher.ru/forum/forumdisplay.php?f=5)
-   -   архи важно HELP!!!! (http://www.flasher.ru/forum/showthread.php?t=37086)

ama2001 12.09.2002 18:13

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

RDA 12.09.2002 18:17

Есть такая штука - Selection....

ama2001 12.09.2002 18:28

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

PInGWIN 12.09.2002 19:09

Вложений: 1
Вот пример...

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

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


Часовой пояс GMT +4, время: 05:48.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.