首页 > 解决方案 > IntellijIdea 中的 Action Script 3 TextArea 组件

问题描述

我需要带滚动条的 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\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”。在defaultStylesupSkin 中是“TextArea_upSkin”。看起来我也需要一些图形文件。

同一文件夹中的“d:\Program Files\Adobe\Adobe Animate 2020\Common\Configuration\Component Source\ActionScript 3.0\User Interface\ComponentShim.fla”没有帮助。

标签: actionscript-3flashintellij-idea

解决方案


推荐阅读