var text:HTMLDivElement = new HTMLDivElement();
text.style.lineHeight = 30;
text.style.color = color;
text.style.align = "center";
text.style.weight = "bold";
text.innerHTML = "中华人民共和国";
text.filters = [new GlowFilter("#000", 4, 2, 2)];
text.style.width = 500;
text.x = (ClientConfig.displayWidth-text.width)/2;
text.y = (ClientConfig.displayHeight-text.contextHeight)/2;
addChild(text);
这是我们LayaAirIDE引擎的问题,谢谢提出。
临时解决方案将 text.style.width = 500; 放在设置滤镜之后。