Dev
搜索

Dev

cocos2d js编译
发表于2016-01-06|cocos2d-js
cocos compile -p web -m release -sC:\Users\Ziyi\Documents\www\cocos2d\pro1
target.removeTouchEventListenser is not a function
发表于2016-01-06|cocos2d-js
正确写法 target.removeTouchEventListenser;
cc.director.replaceScene is not a function
发表于2016-01-05|cocos2d-js
coocs2d-js 3.x 之后场景切换用的是 cc.director.runScene
cocos2d-js 创建新工程
发表于2016-01-05|cocos2d-js
// 创建一个包含 Cocos2d-x JSB 和 Cocos2d-html5 工程: cocos new -l js // 创建一个仅包含 Cocos2d-html5 的工程: cocos new -l js --no-native // 在指定的目录创建一个指定名字的工程: cocos new projectName -l js -d ./Projects 正常使用: cocos new projectName -l js --no-native -d ./Projects  
js中的this关键字详解
发表于2016-01-04|js
this是Javascript语言的一个关键字。它代表函数运行时,自动生成的一个内部对象,只能在函数内部使用 随着函数使用场合的不同,this的值会发生变化。但是有一个总的原则,那就是this指的是,调用函数的那个对象。 情况一:纯粹的函数调用 这是函数的最通常用法,属于全局性调用,因此this就代表全局对象Global。 function test(){ this.x = 1; alert(this.x); } test(); // 1 为了证明this就是全局对象,我对代码做一些改变: var x = 1; function test(){ alert(this.x); } test(); // 1 运行结果还是1。再变一下: var x = 1; function test(){ this.x = 0; } test(); alert(x); //0 情况二:作为对象方法的调用 函数还可以作为某个对象的方法调用,这时this就指这个上级对象。 function test(){...
JS的构造函数
发表于2016-01-04|js
原文地址:http://www.cnblogs.com/jikey/archive/2011/05/13/2045005.html //构造函数//使自己的对象多次复制,同时实例根据设置的访问等级可以访问其内部的属性和方法//当对象被实例化后,构造函数会立即执行它所包含的任何代码function myObject(msg){//特权属性(公有属性)this.myMsg = msg; //只在被实例化后的实例中可调用this.address = ‘上海’; //私有属性var name = ‘豪情’;var age = 29;var that = this; //私有方法function sayName(){alert(that.name);}//特权方法(公有方法)//能被外部公开访问//这个方法每次实例化都要重新构造而prototy...
PHP获取文件大小
发表于2016-01-04|php
这两天做了个把图片转为base64传到服务器后,想限制图片大小, 可以用strlen测量传回来的字符串长度,基本上即为图片大小 bit 乘以1024即为byte 注意这里使用strlen而不是sizeof sizeof() 函数计算 数组中元素数目 或 对象中的 属性个数。    
js获取当前域名
发表于2015-12-31|js
<script language=”javascript”>//获取域名host = window.location.host;host2=document.domain; //获取页面完整地址url = window.location.href; document.write(“<br>host=”+host)document.write(“<br>host2=”+host2)document.write(“<br>url=”+url)</script>
php gd库 imagettftext
发表于2015-12-30|php
array imagettftext ( resource $image , float $size , float $angle , int $x , int $y , int $color , string $fontfile ,string $text ) image An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(). size The font size. Depending on your version of GD, this should be specified as the pixel size (GD1) or point size (GD2). angle The angle in degrees, with 0 degrees being left-to-right reading text. Higher values represent a counter-clockwise rotation. For e...
微信 drawImage
发表于2015-12-30|js
[pcsh lang=”js” tab_size=”4” message=”” hl_lines=”” provider=”manual”] function getimgbase64(file){ var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); canvas.width = canvaswidth; canvas.height = canvasheight; var x=$('#make-photo .theme').children('.photo').css('left').split('px')[0]; var img = new Image(); function tmpLoad() { x = x > 0 ? x : -x; ctx.drawImage(im...
1…686970…102
avatar
developer
AI相伴的开发者博客
文章
1011
标签
712
分类
31
Follow Me
公告
This is my Blog
最新文章
react native 0.83 turbo modules 安卓 使用记录2026-01-10
一种适合开发的设计风格2026-01-07
使用virtualbox 记录2026-01-04
ppa launchpad镜像2025-12-29
multipass 使用记录2025-12-28
分类
  • apicloud3
  • bootstrap8
  • cocos2d-js5
  • createjs17
  • day45
  • docker16
  • egret14
  • flash2x2
标签
常用 COS 页面高度 egret 基本使用 $wpdb 拓展 禁止 mb_strcut H5 微信接口 ppt 无效 百度 getnv 微信支付 微信红包 session共享 模板字符串 thinkphp 常见问题 join 不同终端 url wordpress,plugins_url 和数组 对象 json 删除失败 poppler ci 对工作的思考 denied 中 会展行业 60 tostring 低成本 解决 我的全新开始
归档
  • 一月 2026 3
  • 十二月 2025 5
  • 十一月 2025 2
  • 十月 2025 5
  • 九月 2025 5
  • 八月 2025 2
  • 七月 2025 1
  • 五月 2025 1
网站信息
文章数目 :
1011
本站访客数 :
本站总浏览量 :
最后更新时间 :
© 2025 - 2026 By developer框架 Hexo 8.1.1|主题 Butterfly 5.5.4
搜索
数据加载中