【问题标题】:In as3 adjusting brightness of the shape is not working via coding在 as3 中,通过编码调整形状的亮度不起作用
【发布时间】:2012-03-20 12:18:01
【问题描述】:

这是我的以下代码。

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;

我试过 alpha 和旋转 tat 是完美的。但亮度不起作用。

【问题讨论】:

    标签: actionscript-3 actionscript flash-cs5


    【解决方案1】:

    MovieClips 没有亮度属性,所以这并不奇怪。

    您可以使用ColorTransformfl.motion.Color 来更改亮度。

    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;
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-06-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-26
    • 1970-01-01
    相关资源
    最近更新 更多