[]as hello world 背景还是黑色

as hello world

package {
import laya.ui.Label;
public class LayaSample {

public function LayaSample() {
//初始化引擎
Laya.init(1136, 640);
Laya.stage.bgColor = "#ffffff";
var sp : Label = new Label("hello world");
//sp.fontSize = 55;

sp.pos(100, 100) ;
//sp.color = "#000000";
Laya.stage.addChild(sp);

}
}
}

chrome 下查看源代码

<html>
<head>
<meta charset='utf-8'/>
<title>www.layabox.com</title>
<meta name='renderer' content='webkit'>
<meta name='viewport' content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no'/>
<meta name='apple-mobile-web-app-capable' content='yes' />
<meta name='full-screen' content='true' />
<meta name='x5-fullscreen' content='true' />
<meta name='360-fullscreen' content='true' />
<meta http-equiv='expires' content='0' />
<meta name='laya' screenorientation='landscape' />
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta http-equiv='expires' content='0' />
<meta http-equiv='Cache-Control' content='no-siteapp' />
</head>
<body style='margin:0;overflow:none;overflow-x:hidden;overflow-y:hidden;background-color: #000;'>
<script src='LayaSample.max.js' loader='laya'></script>
</body>
</html>

背景没有赋值成黑色
已邀请:

mingchaoyan

赞同来自:

已解决,原来是用flash develop的不用按照教学视频中那样额外再添加classpath了(至少最新的1.7.6是这样)
感谢梦佳老师远程指导

mingchaoyan

赞同来自:

上传整个工程附件

Monica - 知识达人

赞同来自:

你这个例子我这边测试没有问题的

1.png

 

该问题目前已经被锁定, 无法添加新回复

商务合作
商务合作