Download the .fla file carRotatingWheels.fla by
right-clicking and saving or left mouse button clicking and opening it
in Flash.
carGo_btn.addEventListener(MouseEvent.CLICK, carGo);
carStop_btn.addEventListener(MouseEvent.CLICK, carStop);
wheelsGo_btn.addEventListener(MouseEvent.CLICK, wheelsGo);
wheelsStop_btn.addEventListener(MouseEvent.CLICK, wheelsStop);
function carGo(evt:MouseEvent) {
play();
}
function carStop(evt:MouseEvent) {
stop();
}
//
-----------------------------------------------------------------------
wheelsGo_btn.addEventListener(MouseEvent.CLICK, wheelsGo);
wheelsStop_btn.addEventListener(MouseEvent.CLICK, wheelsStop);
function wheelsGo(evt:MouseEvent) {
theCar.rearWheel.play();
theCar.frontWheel.play();
}
function wheelsStop(evt:MouseEvent) {
theCar.rearWheel.stop();
theCar.frontWheel.stop();
}