easljs drawCircle x 和 y属性
两个属性是指相对圆心的位置 示例: [pcsh lang=”js” tab_size=”4” message=”” hl_lines=”” provider=”manual”] var shape = new createjs.Shape(); shape.graphics.beginFill("#000").drawCircle(0,0,100); shape.x = 0; shape.y = 0; [/pcsh]
easljs drawCircle 变椭圆的解决办法
很可能是设置了canvas的css样式 canvas应该通过属性width和height去设置长高,否则会出现椭圆 示例: [pcsh lang=”js” tab_size=”4” message=”” hl_lines=”” provider=”manual”] <canvas id='gameview' width="210" height="210"></canvas> [/pcsh]
easljs Shape 类
使用方法: 会生成一个Graphic实例,用graphics属性可以获取他 示例: [pcsh lang=”js” tab_size=”4” message=”” hl_lines=”” provider=”manual”] var shape = new createjs.Shape(); shape.graphics.beginFill("#ff0000").drawCircle(0, 0, 50); [/pcsh]
js 事件 默认传参
使用easljs时,要在图片完全加载后才能使用Bitmap进行初始化 用到了onload事件,发现这个事件会默认传递事件‘event’过去 不知其他事件是不是都是这样的 示例: [pcsh lang=”js” tab_size=”4” message=”” hl_lines=”” provider=”manual”] image.onload = function(e){ img = new createjs.Bitmap(e.target); stage.addChild(img); stage.update(); } [/pcsh]
createjs easeljs 容器
createjs有两个‘容器’ 一个是‘stage’ 一个是‘container’ 如果东西向过多,可以放到‘container’中 刷新之后才能显示 示例:
PHP 关闭错误提示的方法
[pcsh lang=”php” tab_size=”4” message=”” hl_lines=”” provider=”manual”] ini_set("display_errors", "Off"); error_reporting(E_ALL | E_STRICT); [/pcsh]
apache 阿帕奇 2.4.x 2.4.9 403 允许外部访问
1.检查 Require all granted 2.apache的www目录最好别有空格!!!
mysqli_stmt_close
mysqli_stmt::close – mysqli_stmt_close —关闭prepared statement 面向对象写法: bool mysqli_stmt::close ( void ) 面向过程: bool mysqli_stmt_close ( mysqli_stmt $stmt )
mysqli_stmt_field_count
mysqli_stmt::$field_count – mysqli_stmt_field_count — Returns the number of field in the given statement 获得行数 面向对象风格 int $mysqli_stmt->field_count; 过程化风格 int mysqli_stmt_field_count ( mysqli_stmt $stmt )
php mysqli_stmt_fetch
mysqli_stmt::fetch – mysqli_stmt_fetch — Fetch results from a prepared statement into the bound variables 获取prepared statement 绑定变量语句执行后的结果? 写法: 面向对象风格: bool mysqli_stmt::fetch ( void ) 过程化风格 bool mysqli_stmt_fetch ( mysqli_stmt $stmt ) 参数 stmt 仅以过程化样式:由 mysqli_stmt_init() 返回的 statement 标识。