// This line defines a variable of type ColorTransform and naming it colorTransform
var colorTransform:ColorTransform = new ColorTransform();
color_btn.addEventListener(MouseEvent.CLICK, paint);
// here is what happens when the button is clicked
function paint(event:Event):void
{
colorTransform.color = 0xFF0000;
test_mc.transform.colorTransform = colorTransform;
}
视频讲解
a闪百度博客
http://hi.baidu.com/%B0%B5%BA%DA%B2%E0%CE%C0
本文介绍如何在ActionScript中定义ColorTransform变量并应用于MC,实现颜色变换效果。通过按钮点击触发颜色改变,展示了基本的颜色操作和事件响应。

被折叠的 条评论
为什么被折叠?



