[]mac下用FB打包发布测试页面,chrome浏览器看不到预期显示文字
macos10.12.4,FB4.7,layaair as3 1.7.4beta
会报一些warning(全路径太长,我截掉了,另外行号可能对不上,我贴上来的时候删掉了注释和空行)
用windows+FB编译出来的页面,mac下chrome是能正常显示的,所以怀疑是我的mac编译环境有问题?
/LayaAirTest/src/LayaAirTest.as (8):warning:Laya.init This variable is not defined.
/LayaAirTest/src/LayaAirTest.as (9):warning:Laya.timer.currTimer This variable is not defined.
/LayaAirTest/src/LayaAirTest.as (20):warning:Laya.stage.bgColor This variable is not defined.
/LayaAirTest/src/LayaAirTest.as (22):warning:Laya.stage.addChild This variable is not defined.
代码如下:
package
{
import laya.display.Text;
public class LayaAirTest
{
public function LayaAirTest()
{
Laya.init(600, 300);
var txt:Text = new Text();
txt.text = "abc"+Laya.timer.currTimer;
txt.color = '#FF0000';
txt.fontSize = 66;
txt.stroke = 5;
txt.strokeColor = '#FFFFFF';
txt.bold = true;
txt.pos(60,100);
Laya.stage.bgColor = '#23238E';
Laya.stage.addChild(txt);
}
}
}
会报一些warning(全路径太长,我截掉了,另外行号可能对不上,我贴上来的时候删掉了注释和空行)
用windows+FB编译出来的页面,mac下chrome是能正常显示的,所以怀疑是我的mac编译环境有问题?
/LayaAirTest/src/LayaAirTest.as (8):warning:Laya.init This variable is not defined.
/LayaAirTest/src/LayaAirTest.as (9):warning:Laya.timer.currTimer This variable is not defined.
/LayaAirTest/src/LayaAirTest.as (20):warning:Laya.stage.bgColor This variable is not defined.
/LayaAirTest/src/LayaAirTest.as (22):warning:Laya.stage.addChild This variable is not defined.
代码如下:
package
{
import laya.display.Text;
public class LayaAirTest
{
public function LayaAirTest()
{
Laya.init(600, 300);
var txt:Text = new Text();
txt.text = "abc"+Laya.timer.currTimer;
txt.color = '#FF0000';
txt.fontSize = 66;
txt.stroke = 5;
txt.strokeColor = '#FFFFFF';
txt.bold = true;
txt.pos(60,100);
Laya.stage.bgColor = '#23238E';
Laya.stage.addChild(txt);
}
}
}
没有找到相关结果
已邀请:
要回复问题请先登录
2 个回复
magmaster
赞同来自:
之前是手动配置的FB工程,src和libs引用的是LayaAir SDK里面的内容,不知道跟这个有没有关系
cuixueying
赞同来自: