Copy link to clipboard
Copied
I'd like to condition (yeshbigGrayBall3) to play only after (yeshgBall2) finishes its internal movement, Something like that.
function release6Ball1(event: MouseEvent): void {
if (yeshgBall2.frame(60)) {
yeshbigGrayBall3.gotoAndPlay(1);
} else {
yeshgBall2.gotoAndPlay(1);
}
}
Basically I want yeshbigGrayBall3 to play on the next click, only after yeshgBall2 finishes it's movement. which is in frame 60. I'm just not sure how to tell it to check on which frame the object is in. any Idea?
Just how you have it, but the property is currentFrame.
if (yeshgBall2.currentFrame == 60) {
// play 3
} else {
// play 2
}
This is assuming the object is currently on the timeline and available to the script.
Copy link to clipboard
Copied
Just how you have it, but the property is currentFrame.
if (yeshgBall2.currentFrame == 60) {
// play 3
} else {
// play 2
}
This is assuming the object is currently on the timeline and available to the script.
Copy link to clipboard
Copied
I'm getting Error #1006: value is not a function. on line 12 which is this: if (yeshgBall2.currentFrame(60)) {
Copy link to clipboard
Copied
Ok got it. Thank you so much
Copy link to clipboard
Copied
You're welcome