[]LAYAAIR加载SWF无线循环
private const SheepSWFPath:String = "res/swf/sheep3.swf";
Laya.init(1136, 640);
// Laya.stage.alignV = Stage.ALIGN_MIDDLE;
// Laya.stage.alignH = Stage.ALIGN_CENTER;
Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL;
//设置水平对齐
Laya.stage.alignH = "center";
//设置垂直对齐
Laya.stage.alignV = "middle";
_Sheep=createMovieClip(SheepSWFPath);
private function createMovieClip(path:String):MovieClip
{
var mc:MovieClip = new MovieClip();
mc.load(path,false);
mc.play(0,false);
mc.name=path;
mc.loop=false;
// mc.pos(570,230)
mc.width=1000;
mc.height=700;
mc.on("click", this, onAniClick);
trace("mcwidth:"+mc.width+"mcheight:"+mc.height);
// mc.on(Event.LOADED,this,onComp);
// mc.on(Event.COMPLETE,this,onEnd);
// mc.x = (Laya.stage.width ) / 2;
// mc.y = (Laya.stage.height) / 2;
Laya.stage.addChild(mc);
return mc;
}
但是加载完成并没有播放一遍停在最后一帧,而是无线反复循环播放;动画已经设置成图形播放一次了,影片剪辑什么的都不行
没有找到相关结果
已邀请:
要回复问题请先登录
2 个回复
shinestarpvz
赞同来自:
cuixueying
赞同来自: