在AS3调整形状的亮度不是通过编码工作 [英] In as3 adjusting brightness of the shape is not working via coding

查看:211
本文介绍了在AS3调整形状的亮度不是通过编码工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我下面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.

推荐答案

那么有没有亮度属性的影片剪辑,这样也就不足为奇了。

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

您可以使用<一个href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/geom/ColorTransform.html">ColorTransform与<一个href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/motion/Color.html">fl.motion.Color改变亮度。

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;

这篇关于在AS3调整形状的亮度不是通过编码工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆