1。创建一个图片元件
2。拉入场景,属性改为movie ,命名n
3。选中n,F9
onClipEvent (mouseDown) {
colorA = new Color(_root.n);
colorA.setTransform(ChangeOrange());
}
onClipEvent (keyDown) {
colorA = new Color(_root.n);
colorA.setTransform(ChangeOrange());
}
onClipEvent (load){
function ChangeOrange () {
change_color = new Object();
change_color.rb = random(255);
change_color.gb = random(255);
change_color.bb = random(255);
return change_color;
}
}