Copy link to clipboard
Copied
Hi
For a school assignment I am animating an infographic using an HTML5 canvas, and what my problem seems to be is:
When I press the button (on which I added an eventListener to call for a function which should the given animation for the given Movieclip.
At the moment I am only trying to make the menu go from center screen (see screenshot 1) to move to the left (to frame 9). All the actions added in the Movieclip are just stops.
In the Movieclip, I added all the necessary frames, added tweens, the whole shabang.
But when I test the animation, it doesn't play the Movieclip, it jumps to the stop added a few frames further.
The console doesn't have anything to say, so that doesn't really help 😅.
Does anyone know how to troubleshoot this thing?
Thanks in advance!
/*stop animatie*/
this.stop();
/*code*/
const startButtons = [this.informatieKnopStart, this.bestemmingenKnop, this.passagiersKnopStart, this.vlootKnopStart, this.reisformulesKnopStart];
this.logoStatisch.visible = false;
this.knoppenMc.visible = false;
startButtons.forEach(button =>{
button.visible = false;
});
setTimeout(() =>{
this.logoAnimatie.visible = false;
this.logoStatisch.visible = true;
this.logoStatisch.play();
setTimeout(() =>{
this.knoppenMc.visible = true;
startButtons.forEach(button =>{
button.visible = true;
});
},1000);
}, 4500);
this.informatieKnopStart.addEventListener("click", menu.bind(this));
function menu(){
this.knoppenMc.play();
}
This just couldn't slip my mind, and I'm quite happy to say I've found a solution for my problem.
In the Movieclip, for each layer, I ungrouped all items and regrouped them, since Tweens won't work on layers with ungrouped items or multiple grouped items.
So by remaking the Movieclip with "decently" grouped layers, I fixed the problem.
Hope this was helpful for anyone with the same problem!
Have a good day!
Copy link to clipboard
Copied
This just couldn't slip my mind, and I'm quite happy to say I've found a solution for my problem.
In the Movieclip, for each layer, I ungrouped all items and regrouped them, since Tweens won't work on layers with ungrouped items or multiple grouped items.
So by remaking the Movieclip with "decently" grouped layers, I fixed the problem.
Hope this was helpful for anyone with the same problem!
Have a good day!
Copy link to clipboard
Copied
Hi.
Thanks for sharing the solution.
Happy learning!