更改影片剪辑的亮度
设置影片剪辑的颜色,对影片
| 1 2 3 4 5 6 7 8 | import fl.motion.Color; var color:Color = new Color(); color.brightness = 0.3; //设置亮度 me.currentTarget.transform.colorTransform = color;//将设置的亮度应用于影片剪辑 //--------------------------------------------------------- color.tintColor = 0xFFFF00; color.tintMultiplier = 0.5; me.currentTarget.transform.colorTransform = color; //tintColor设置填充颜色,tintMultiplier设置填充的比例 |
设置鼠标经过某个影片剪辑时,更改该影片剪辑的亮度,移出是变会原来的颜色
| 1 2 3 4 5 6 7 8 9 10 | function changColor(me:MouseEvent):void{ me.currentTarget.buttonMode = true; color.brightness = 0.3; //设置亮度 me.currentTarget.transform.colorTransform = color;//将设置的亮度应用于影片剪辑 } function turnBackColor(me:MouseEvent):void{ color.brightness = 0; //设置亮度 me.currentTarget.transform.colorTransform = color;//将设置的亮度应用于影片剪辑 } |
| setTint | () | 方法 |
public function setTint(tintColor:uint, tintMultiplier:Number):void | 语言版本: | ActionScript 3.0 |
| 运行时版本: | AIR 1.0 Flash Player 9.0.28.0 |
同时设置着色颜色和色量。
参数
tintColor:uint — 0xRRGGBB 格式的着色颜色值。 | |
tintMultiplier:Number — 应用着色颜色的百分比(0 到 1 之间的小数值)。 如果为 tintMultiplier = 0,则目标对象为原始颜色,看不到着色。 如果为 tintMultiplier = 1,则目标对象完全着色,看不到原始颜色。 |

浙公网安备 33010602011771号