加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Flash+Player+11+Array+Bug

发布时间:2020-12-15 06:43:43 所属栏目:百科 来源:网络整理
导读:最近 Flash Player 11 正式版發表不久 網友 Vincent 留言發現空 Array 的 splice 操作會出現問題 測試程式如下 package { import flash.display.Sprite; import flash.text.TextField; import flash.text.TextFormat; [SWF(width="300",height="200")] publi

最近 Flash Player 11 正式版發表不久
網友 Vincent 留言發現空 Array 的 splice 操作會出現問題
測試程式如下

package {

import flash.display.Sprite;

import flash.text.TextField;

import flash.text.TextFormat;

[SWF(width="300",height="200")]

public class Main extends Sprite {

public function Main() {

var txt:TextField = new TextField();

// txt.defaultTextFormat = new TextFormat("Microsoft JhengHei",16);

txt.defaultTextFormat = new TextFormat("微軟正黑體",16);

txt.text = "微軟正黑體";

txt.x = 100;

txt.y = 50;

addChild(txt);

}

}

}

輸出結果


WIN 11,1,152 StandAlone
[,]
[,X,Y,Z,]

解決方式都寫在註解裡面了,最簡單的方式就是明確指定元素 1 位置的數值 需要注意是,一旦 Array.length 縮減成 0,又重新拉長 就需要再次修正一下 Array

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读