Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

按照教程运行后不能显示图片 #34

Open
sofeien opened this issue Jun 15, 2018 · 1 comment
Open

按照教程运行后不能显示图片 #34

sofeien opened this issue Jun 15, 2018 · 1 comment

Comments

@sofeien
Copy link

sofeien commented Jun 15, 2018

按教程:
class Main extends egret.DisplayObjectContainer{
public constructor()
{
super();
this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this);
}
private onAddToStage(event:egret.Event) {
RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onGroupComplete, this);
RES.loadConfig("resource/default.res.json", "resource/");
RES.loadGroup("preload");
}
private onGroupComplete()
{
var img:egret.Bitmap = new egret.Bitmap();
img.texture = RES.getRes("egret_icon_png");
this.addChild(img);
}
}
运行后并没有显示图片

@runinspring
Copy link
Contributor

这是哪篇文档的错误?能给个链接吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants