• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 441 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0042 秒)

111. 类似抠图、挖空效果的实现 [ 69%]

...);             blue.size(500, 500);             blue.on("click", this, onClick);             Laya.stage.addChild(blue);                          //增加一个容器             box = new Sprite();             //设置容器为画布缓...

来源: Laya_社区 发布时间: 20161122

112. LayaAir开发笔记(1)五十音图连连看 [ 68%]

...bold = true; copyright.pos(20, g_stat_heiht - 35); copyright.on(Laya.Event.CLICK, this, function() { window.location.href = "http://www.coderluan.com"; }); Laya.stage.addChild(copyright); 3.设置积分板和开始菜单 右下弄了个“点击开始游戏”的文本,点击只会游戏开始,...

来源: Laya_社区 发布时间: 20160623

113. 点击区域问题 [ 68%]

...Area = new laya.maths.Rectangle(-50,-100,100,100); sp.on(laya.events.Event.CLICK,this,this.spHandler); function spHandler() {     sp.graphics.clear();     var rc:number = Math.floor(Math.random()*0xffffff);     sp.graphics.drawRect(-50,-100,100,100,"#"+rc); } 这样多包几层,点击...

来源: Laya_社区 发布时间: 20180106

114. import Event = laya.events.Event; 报错 [ 68%]

...: 997 关注: 2 人 136*****441 • 2018-05-22 21:30 message: 'Property 'CLICK' does not exist on type '{ new (type: string, eventInitDict?: EventInit): Event; prototype: Event; readonly AT_TARGET: num...'.' at: '20,39' source: 'ts' 不import , 直接用 Event.CLICK 也会报错

来源: Laya_社区 发布时间: 20180522

115. ui list 里面的元素不能点击两次 [ 68%]

...t,index:Number):void { // TODO Auto Generated method stub if(e.type==Event.CLICK) { trace("click"); } } 2016-12-02 3 2 分享 微博 QZONE 微信 sunkehappy 赞同来自: @cuixueying 感谢提供方案,不过我还是想多说一句,selectHander最好是应该允许被调用多次吧?为什么...

来源: Laya_社区 发布时间: 20161202

116. sprite 设置为静态变量后,无法从舞台移除 [ 68%]

....loadImage("background.jpg"); Laya.stage.addChild(sp); Laya.stage.on(Event.CLICK,this,onClick); function onClick():void { // TODO Auto Generated method stub Laya.stage.off(Event.CLICK,this,onClick); Laya.stage.removeChild(sp); Loader.clearRes("background.jpg"); sp.destroy(); } } } } 2016-09-05 0 0 ...

来源: Laya_社区 发布时间: 20160905

117. Sprite-新手引导 [ 68%]

...cacheAs = "bitmap"; Laya.stage.addChild(guideContainer); gameContainer.on("click", this, nextStep); //绘制遮罩区,含透明度,可见游戏背景 var maskArea = new Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContaine...

来源: Laya_示例 发布时间: 20260106

118. UI-Clip [ 68%]

..."#FFFFFF,#FFFFFF,#FFFFFF,#FFFFFF"; controller.size(84, 30); controller.on('click', this, onClipSwitchState); controller.x = (Laya.stage.width - controller.width) / 2; controller.y = (Laya.stage.height - controller.height) / 2 + 110; Laya.stage.addChild(controller); } function onClipSwitchState() { i...

来源: Laya_示例 发布时间: 20260106

119. dialog.removeSelf is not a function [ 68%]

...meInfoDialogUI;。。。(关闭按钮)this.ui.ibtn_close.on(Laya.Event.CLICK,this,this.ui.close);。。。(点击之后)Uncaught TypeError: dialog.removeSelf is not a function....求助大神谢谢啦~~~ 2017-04-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结...

来源: Laya_社区 发布时间: 20170418

120. 切换位图,点击图片距离容器的区域也会触发点击事件 [ 67%]

...img.width = 300; //宽高 img.height = 200; switchImg(); img.on(Laya.Event.CLICK, this, switchImg) //点击事件 Laya.stage.addChild(img); function switchImg() { img.graphics.clear(); //清除绘制 var imgUrl = (this.flag = !this.flag) ? this.img1 : this.img2; img.loadImage(imgUrl, 100, 100) } }...

来源: Laya_社区 发布时间: 20180502