//限制输入的字符
this.Account.restrict = “a-zA-Z0-9”;
//设置list的滚动
this.List.vScrollBarSkin=”;
this.List .itemRender = Item;
this.List .renderHandler = new Laya.Handler(this, this.onRender);
this.List .scrollBar.elasticBackTime = 200;
this.List .scrollBar.elasticDistance = 200;
 onRender(_item:Item,_index:number ):void
{
   _item.seItem();
}
//回调
new Laya.Handler(this, this.void);
this.call.run();
this.call.runWith(数组/参数);
// 按钮事件设置
this.button.on(laya.events.Event.CLICK, this, this.Void,[Parameter]);
this.button.on(Laya.Event.CLICK, this, this.Void,[Parameter ] );
MOUSE_MOVE、MOUSE_DOWN、MOUSE_UP….
//委托
this.Call.method = ((Error)=>{
      //哈哈哈
});
//Tween
tween : Laya.Tween;
if (this.tween != null)
{
   Laya.Tween.clear(this.tween);
}
this.tween = Laya.Tween.to(this, { rotation: 0 }, 200,null,Laya.Handler.create(this,this.Call));
//设置锚点中
this.icon.pivot(this.icon.width/2, this.icon.height/2);
//播放图集动画
this.ani = new Laya.Animation();
this.ani.loadAtlas(“res/atlas/Effect/文件夹名json”);
this.ani.interval = 80;
this.ani.pos(-30, -50);
this.ani.on(Laya.Event.COMPLETE, this, this.onAnimationOver);
this.addChild(this.ani);
this.ani.visible = false;
//搜索字符串替换字符串中的文本
string.replace(“{Num}”,替代文字);
//字符串拆分为子字符串使用指定的分隔符,返回数组。
string.getPercentage().split(‘|’);
//得到当前鼠标点击的位置
var _MOUSEX:number = Laya.stage.mouseX;
var _MOUSEY:number = Laya.stage.mouseY;
//清理掉自身
Laya.stage.removeChild(this);
//Loop
定时重复执行(基于帧率)
Laya.timer.frameLoop(1 , this, this.void);
//定时重复执行
Laya.timer.loop(1000,this,this.void);
//定时执行一次
Laya.timer.once(5000,this,this.void);
//备注
【** */】
【/**
 *
 */】
//骨骼动画
import Skeleton = Laya.Skeleton;
import Templet  = Laya.Templet;
import Browser  = Laya.Browser;
import Stat     = Laya.Stat;
import WebGL    = Laya.WebGL;
let skeleton = new SkeletonAnimation(“res/spine/play.sk”);
skeleton.startFun();
//开始配置动画
this.mFactory = new Templet();
this.mFactory.on(Laya.Event.COMPLETE, this, this.parseComplete);
this.mFactory.on(Laya.Event.ERROR, this, this.onError);
this.mFactory.loadAni(“res/spine/play.sk” );
//加载骨骼动画完成,初始化骨骼动画
protected parseComplete():void
{
      this.mArmature =this.mFactory.buildArmature(0);
      this.mArmature.x = this.startX;
      this.mArmature.y = this.startY;
      this.mArmature.scale(this.scaleX, this.scaleY);
      this.addChild(this.mArmature);
      //处理结束时的回调
      //this.mArmature.on(Laya.Event.STOPPED, this, this.completeHandler);
      this.basePlay();
}
//默认播放动画,按照动画数量轮流播放
public basePlay():void
{
    this.mCurrIndex++;
    if (this.mCurrIndex >= this.mArmature.getAnimNum())
    {
         this.mCurrIndex = 0;
    }
    this.mArmature.play(nameOrIndex, this.loop);
}
//清理
Laya.stage.removeChild(this.mArmature);
this.mFactory.destroy();
if(!this.mArmature.destroyed)
     this.mArmature.destroy();
this.removeSelf();
//Array Sort
this.Array.sort ( (f1, f2) =>
{
    if (f1>f2)
    {
         return -1;
    }
    else
    {
        return 1;
    }
}