Hier mal ein Bsp, wobei man nun drei MCs hat, mit den Instanznamen mc1, mc2 und mc3
PHP-Code:
function setBG(farbe){
beginFill(farbe);
moveTo(0,0);
lineTo(Stage.width,0);
lineTo(Stage.width,Stage.height);
lineTo(0,Stage.height);
lineTo(0,0);
endFill();
}
mc1.onRelease = function(){
setBG(0xFF0000);
}
mc2.onRelease = function(){
setBG(0x00FF00);
}
mc3.onRelease = function(){
setBG(0x0000FF);
}