960*60广告
首页 > 软件类 > Adobe > Flash

AS3.0 图片变黑白 图片彩色变黑白代码

2013-07-04 17:45:24我要评论(0)字号:T|T
AS3.0 图片变黑白 图片彩色变黑白代码
复制代码
代码如下:
import flash.filters.ColorMatrixFilter;//导入色彩滤镜 var matrix:Array = [ 0.5,0.5,0.082,0,0,0.5,0.5,0.082,0,0,0.5,0.5,0.082,0,0,0,0,0,1,0 ];//定义色彩数组 var colorMat:ColorMatrixFilter = new ColorMatrixFilter(matrix);//创建滤镜对象 //添加鼠标事件 image_mc.addEventListener(MouseEvent.MOUSE_OVER,over); image_mc.addEventListener(MouseEvent.MOUSE_OUT,out); image_mc.filters = [colorMat]; function over(e:MouseEvent):void{ image_mc.filters = []; } function out(e:MouseEvent):void{ image_mc.filters = [colorMat]; }

()50%
顶一下
(0)50%
踩一下
共有条评论

相关资讯

    无相关信息

更多相关搜索

最新评论(共条评论) 查看全部评论

发表评论

300*250广告