Actions firing when gotoAndPlay passes over a set of frames.

Explorer ,
Oct 23, 2020 Oct 23, 2020

Copy link to clipboard

Copied

I have a timeline of 10 frame labels, each label has a movieclip on it and in those movieclips there's a short animation, with a couple of actions being fired along the sub-timeline which play some sounds.
I have a next and prev button on my main timeline to go between the labels.
Something new seems to be happening when I use gotoAndPlay to go backards through the frame labels though.
If I go from say label 4 to label 3, all of the actions on the timeline of the movieclip on label 3 fire instantly in reverse order, as if the movieclip animation is being reversed to get to its first frame, rather than jumping there instantly. This means it tries to play all the sounds, which I can see it logging in the console, before it then reaches the first frame, and then starts normally.

This appears to be happening in animate 20 and 21.

Views

37

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 23, 2020 Oct 23, 2020

Copy link to clipboard

Copied

Small update to this.
I'm now using...

stage.on("drawstart", initReady, this, true);
function initReady() {
  this.ready = true;
}

and

if (Events != null && this.ready) {
  Events.$emit('play-sound', {'id': 'bounce1'});
}

 to ensure my movieclip is actually ready and not in the process of being re-initialised which is when it's firing off all my timeline actions before the drawstart has happened.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines