赞
踩
1.创建exml文件

2.如果调试时图片资源报错404注意资源路径

3.通过设置skinName的方式调用EXML
-
- class abc extends egret.Sprite{
- public constructor() {
- super();
- this.cteateEXML();
- }
- private cteateEXML(): void {
- let button = new eui.Button();
- button.skinName = "resource/skins/ButtonSkin.exml";
- this.addChild(button);
- button.x = 200;
- button.y = 200;
- }
- }
4.实例化abc
- let abcd = new abc();
- this.stage.addChild(abcd);
5.成功调用EXML

Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。