I am trying to make an animation in Animate using Gsap and JS. But cant seem to figure out why my animation is not playing. took an example from the teacher and his main timeline. but somehow i dont get the logo to animate when i hover over it.
code:
root.logoRyzen_mc.addEventListener("mouseover", ryzenAnimate_over);
function ryzenAnimate_over(){
var ryzenAnimate_overTimeline = gsap.timeline(
{
delay : 0,
repeat : 0,
yoyo :true
}
);
var ryzenLogoParts = [
root.logoRyzen_mc.ryzenLogoText_mc,
root.logoRyzen_mc.ryzenCircle_mc
];
ryzenAnimate_overTimeline.staggerTo(
ryzenLogoParts,
0.5,
{
scaley :150,
scalex :150
}
);
ryzenAnimate_overTimeline.play();
}
dont get an error, console log is clean, initiial animation runs. Just this event wont run if i mouseover it. My teacher gave the hin, you should play the animation instead of returning it. so i put the animation.play(); in the end but still. nada.
There is a sybol with instance name logoRyzen_mc inside that instance are the ryzen logo circle and text (ryzenLogoText_mc and ryzenCircle_mc) which make up the elements for the logo.
just somehow cant get this to work. Tips anyone?