小菜AS3之路

2012.2.17
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年10月18日

摘要: as3中的取整、取小数点位数2012-05-23Posted by 81难 Math.round()方法:Math.round()可以四舍五入对数字取整12trace(Math.round(39.88)); //输出40trace(Math.round(58.33)); //输出58Math.floor()方法:Math.floor()可以向下取整12trace(Math.floor(39.88)); //输出39trace(Math.floor(58.33)); //输出58Math.ceil()方法:Math.ceil()可以向上取整12trace(Math.ceil(39.88)); / 阅读全文

posted @ 2012-10-18 16:25 枫雨 阅读(861) 评论(0) 推荐(0)

摘要: file.browse([filter])file.addEventListener(Event.SELECT,handler);file.addEventListener(Event.CANCLE,handler);载入内存:load()privatefunctionselectHandler(e:Event):void{upfile.load();//开始加载用户选择的本地文件upfile.addEventListener(Event.COMPLETE,onComplete);upfile.addEventListener(IOErrorEvent.IO_ERROR,ioErrorHand 阅读全文

posted @ 2012-10-18 02:24 枫雨 阅读(1474) 评论(0) 推荐(0)