Can't play/stop 1 ball
Hello everyone.
Please help!
Has 2 jumping balls and 2 buttons (one stop and one play).
When use both ball - all work (push stop button - both balls stop, play button - both balls moving):
import flash.events.MouseEvent;
function ClickStop(Event:MouseEvent){
stop();
}
stop_button.addEventListener(MouseEvent.MOUSE_UP, ClickStop);
function ClickPlay(Event:MouseEvent){
play();
}
play_button.addEventListener(MouseEvent.MOUSE_UP, ClickPlay);
But when try to stop/play only one ball by same buttons- it does't work:
import flash.events.MouseEvent;
function ClickStop(Event:MouseEvent){
RB.stop();
}
stop_button.addEventListener(MouseEvent.MOUSE_UP, ClickStop);
function ClickPlay(Event:MouseEvent){
RB.play();
}
play_button.addEventListener(MouseEvent.MOUSE_UP, ClickPlay);RB - is the instance name.
Also try a layer name.
But nothing..
Please help!
