Action Script 3 TextArea Component в IntellijIdea - PullRequest
0 голосов
/ 15 апреля 2020

Мне нужно TextField с прокруткой. Я нашел пример: https://help.adobe.com/ru_RU/FlashPlatform/reference/actionscript/3/fl/controls/TextArea.html#htmlText

Первая ошибка была fl.controls не найдена. Я добавил папку "d: \ Program Files \ Adobe \ Adobe Animate 2020 \ Common \ Configuration \ Source \ Component Source \ ActionScript 3.0 \ User Interface \" в качестве источника.

После этого, если я запустил пример:

package {
import fl.controls.TextArea;

import flash.display.Sprite;

public class Test_AdobeAnimateComponents extends Sprite {
    public function Test_AdobeAnimateComponents() {
        var myText:String = "";
        myText += "<p>You can use the <b> tag to create <b>bold</b> text.</p>";
        myText += "<p>You can use the <i> tag to create <i>italic</i> text.</p>";
        myText += "<p>You can use the <u> tag to create <u>underlined</a> text.</p>";
        myText += "<p>You can use the <a> tag to create <a href='http://www.adobe.com'>links to other sites</a>.</p>";
        myText += "<p>You can use the <br> tag to create<br>new lines of text<br>whenever you want.</p>";
        myText += "<p>You can use the <font> tag to specificy different font <font color='#FF0000'>colors</font>, <font size='16'>sizes</font>, or <font face='Times New Roman'>faces</font>.</p>";
        myText += "<p>You can use the <img> tag to load images or SWF files:<br><img src='http://www.helpexamples.com/flash/images/logo.png'>.</p>";

        var myTextArea:TextArea = new TextArea();
        myTextArea.setSize(320, 100);
        myTextArea.move(10, 10);
        myTextArea.htmlText = myText;
        addChild(myTextArea);
    }
}
}

Ошибка в drawLayout() файла TextArea.as: фон равен нулю. Это потому что предыдущий drawBackground() хочет найти "upSkin". В defaultStyles upSkin - это "TextArea_upSkin". Похоже, мне нужен также графический файл c.

«d: \ Program Files \ Adobe \ Adobe Animate 2020 \ Common \ Configuration \ Source Component \ ActionScript 3.0 \ User Interface \ ComponentShim.fla» в той же папке не помогло.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...