zoukankan      html  css  js  c++  java
  • 更改影片剪辑的亮度

    设置影片剪辑的颜色,对影片
    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 — 应用着色颜色的百分比(01 之间的小数值)。 如果为 tintMultiplier = 0,则目标对象为原始颜色,看不到着色。 如果为 tintMultiplier = 1,则目标对象完全着色,看不到原始颜色。




  • 相关阅读:
    Liunx之django项目部署
    Liunx之nginx配置
    Liunx之基础学习
    Linux之防火墙【CentOS 7】
    Linux之各程序安装
    Linux之基础命令
    攻城狮必备神注释
    Django-rbac权限
    "/var/lib/mysql/mysql.sock"不存在解决办法
    72张三国历史演变地图
  • 原文地址:https://www.cnblogs.com/babyhhcsy/p/2874979.html
Copyright © 2011-2022 走看看