Bluekylin's Blog

   Think —> Learn —> Done
posts - 110, comments - 749, trackbacks - 4, articles - 29

2011年11月16日

网上查到的基本上都是错的,连《ActionScript 3.0 Cookbook》里也不对,我的意思是跟Flash内容制作工具调的亮度不符,我就奇怪了,用调试模式测试了一个影片剪辑的亮度设置,结果就知道了
import flash.display.DisplayObject
import flash.geom.ColorTransform

//value取值范围-1~1,对应Flash内容制作工具里的-100%-100%
public function setBrightness(obj:DisplayObject,value:Number):void {
var colorTransformer:ColorTransform = obj.transform.colorTransform
var backup_filters:* = obj.filters
if (value >= 0) {
colorTransformer.blueMultiplier = 1-value
colorTransformer.redMultiplier = 1-value
colorTransformer.greenMultiplier = 1-value
colorTransformer.redOffset = 255*value
colorTransformer.greenOffset = 255*value
colorTransformer.blueOffset = 255*value
}else {
value=Math.abs(value)
colorTransformer.blueMultiplier = 1-value
colorTransformer.redMultiplier = 1-value
colorTransformer.greenMultiplier = 1-value
colorTransformer.redOffset = 0
colorTransformer.greenOffset = 0
colorTransformer.blueOffset = 0
}
  obj.transform.colorTransform = colorTransformer
  obj.filters = backup_filters
}
注意上面滤镜的备份,colorTransformer的设置会影响滤镜设置

posted @ 2011-11-16 11:50 Bluekylin 阅读(104) 评论(0) 编辑

2011年6月21日

Xcode iOS真机调试出现
Command /usr/bin/codesign failed with exit code 1

查看详细信息提示:CSSMERR_TP_NOT_TRUSTED

查了点资料,发现原来之前在keychain(钥匙窜访问)中多删了一个证书:Apple Woldwide Developer Relations Certification Authority,它是iPhone Developer证书的签发者,如果它被删除就会导致iPhone Developer证书被识别为未知颁发机构签名,然后xcode中真机调试就会出现上面的错误。解决方法当然是重新把AppleWWDRCA放回去
从Apple官网下载一个
http://www.apple.com/certificateauthority/
找到 Woldwide Developer Relations 选择 Download certificate
下载后拖入keychain(钥匙窜访问)-登录目录。

posted @ 2011-06-21 15:43 Bluekylin 阅读(265) 评论(0) 编辑

2011年6月17日

摘要: find . -name '*.ext' | xargs perl -pi -e 's/find_str/replace_str/g'阅读全文

posted @ 2011-06-17 11:39 Bluekylin 阅读(63) 评论(0) 编辑

2009年12月25日

摘要: 更新:已修复阅读全文

posted @ 2009-12-25 23:23 Bluekylin 阅读(250) 评论(2) 编辑

2009年12月18日

摘要: 更新:Google已经自带切换到英文搜索结果了。阅读全文

posted @ 2009-12-18 22:08 Bluekylin 阅读(263) 评论(0) 编辑

2009年12月13日

摘要: 这可能只是电子邮箱的中国特色,鬼知道会不会普及阅读全文

posted @ 2009-12-13 12:56 Bluekylin 阅读(1561) 评论(13) 编辑

2009年12月11日

摘要: 在“艰苦”的条件下体会它的帅。。。阅读全文

posted @ 2009-12-11 17:51 Bluekylin 阅读(253) 评论(0) 编辑

2009年5月31日

摘要: 恢复被诺基亚5800 v21恶搞的文件,此文提到重命名中文后死翘翘的文件该何去何从阅读全文

posted @ 2009-05-31 14:30 Bluekylin 阅读(878) 评论(1) 编辑

2009年5月15日

摘要: 绝对空间感2阅读全文

posted @ 2009-05-15 11:56 Bluekylin 阅读(264) 评论(0) 编辑

2009年4月30日

摘要: 值得试用一下阅读全文

posted @ 2009-04-30 10:12 Bluekylin 阅读(239) 评论(1) 编辑