In as3 adjusting brightness of the shape is not working via coding

霸气de小男生 提交于 2019-12-08 03:56:23

问题


This is my following code.

var clips:Array=new Array(clip_0_mc,clip_1_mc,clip_2_mc,clip_3_mc,clip_4_mc);
trace(clips);

clips[0].alpha=.5;
clips[3].rotation=45;
clips[3].brightness=100;// This is not working.
clips[1].rotation=170;

I tried alpha and rotation tat is perfect. but brightness is not working.


回答1:


Well there is no brightness property for MovieClips so that is not surprising.

You can use ColorTransform with fl.motion.Color to change brightness.

import flash.geom.Transform;
import flash.geom.ColorTransform;
import fl.motion.Color;
//...
var color:Color = new Color();
color.brightness = 0.3;         
clips[3].transform.colorTransform = color;


来源:https://stackoverflow.com/questions/9786594/in-as3-adjusting-brightness-of-the-shape-is-not-working-via-coding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!