码迷,mamicode.com
首页 > 其他好文 > 详细

影片 发光 变色

时间:2017-09-08 01:14:17      阅读:242      评论:0      收藏:0      [点我收藏+]

标签:nec   default   target   ash   geo   form   col   targe   color   

发光:

import flash.filters.GlowFilter;

var target:MovieClip = MovieClip(e.currentTarget);
target.filters = [new GlowFilter(0xff0000,1,15,15)];
target.filters = [];


chooseMc.filters = [new GlowFilter];

变色:

import flash.geom.ColorTransform;

function chagneColor(mcChange:MovieClip,color:String)
{
	var colorNum:uint;

	switch (color)
	{
		case "blue" :
			colorNum = 0x0061A2;
			break;
		case "black" :
			colorNum = 0x000000;
			break;
		case "brown" :
			colorNum = 0x7A401D;
			break;
		case "green" :
			colorNum = 0x00FF00;
			break;
		case "yellow" :
			colorNum = 0xBCAE07;
			break;
		case "orange" :
			colorNum = 0xF77B00;
			break;
		case "red" :
			colorNum = 0xFF0000;
			break;
		default :
			colorNum = 0xFFFFFF;
	}
	var colorForm:ColorTransform = new ColorTransform  ;
	colorForm.color = colorNum;
	mcChange.transform.colorTransform = colorForm;

}

  

影片 发光 变色

标签:nec   default   target   ash   geo   form   col   targe   color   

原文地址:http://www.cnblogs.com/dt1991/p/7492508.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!