Copy link to clipboard
Copied
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!
shift click (the first frame and last frame in RB' layer) to select all the frames in RB's animation >right click >click cut frames. then double click the library symbol for RB to go to its timeline >right click the first frame and click paste.
same for the other ball.
p.s. i usually charge for downloading and fixing your fla. if you still want me to do that send me a private message.
Copy link to clipboard
Copied
if the top code snippet ever worked, you would need to change your setup for the bottom code snippet to work.
ie, the top code works when there's animation on the timeline that contains that code and if that stops both balls it means both are animated on that timeline. the bottom code would work if RB were animated on its own timeline, not the timeline that contains that code.
solution: copy the animation from the parent timeline and paste into each ball's timeline.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
shift click (the first frame and last frame in RB' layer) to select all the frames in RB's animation >right click >click cut frames. then double click the library symbol for RB to go to its timeline >right click the first frame and click paste.
same for the other ball.
p.s. i usually charge for downloading and fixing your fla. if you still want me to do that send me a private message.
Copy link to clipboard
Copied
Thank you SO MUCH, it's working!! 🙂
Also thahks for contact, if I need a deep consultation with .fla, I'll type you.
Copy link to clipboard
Copied
you're welcome
Copy link to clipboard
Copied
Do you mind if I send you the .fla files from the question by email? I can't attach it to the question or comments.
My email komoneko@mail.ru.
Many thanks!