zoukankan      html  css  js  c++  java
  • StaticText

    此类表示显示列表中的 StaticText 对象。 无法使用 ActionScript 创建 StaticText 对象。 只有创作工具可以创建 StaticText 对象。 尝试创建新的 StaticText 对象会生成 ArgumentError

    若要创建对 ActionScript 3.0 中的现有静态文本字段的引用,可以遍历显示列表中的项。 例如,以下片段检查显示列表中是否包含静态文本字段并将该字段分配给变量:

    代码
    var i:uint;
    for (i = 0; i < this.numChildren; i++) {
         var displayitem:DisplayObject 
    = this.getChildAt(i);
         
    if (displayitem instanceof StaticText) {
             trace(
    "a static text field is item " + i + " on the display list");
             var myFieldLabel:StaticText 
    = StaticText(displayitem);
             trace(
    "and contains the text: " + myFieldLabel.text);
         }
    }
  • 相关阅读:
    Codeforces
    Codeforces
    SCUT
    模板
    SCUT
    SCUT
    模板
    SCUT
    UVA 437 "The Tower of Babylon" (DAG上的动态规划)
    UVA 1025 "A Spy in the Metro " (DAG上的动态规划?? or 背包问题??)
  • 原文地址:https://www.cnblogs.com/sevenyuan/p/1615571.html
Copyright © 2011-2022 走看看