niko
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by niko
-
-
Hi there!
I find there's something I'm not quite grasping using TimelineMax and fromTo, been trying all sorts of different variations, but shouldn't this work? Or am I missing something critical here?
timeline = new TimelineMax(); timeline.append(TweenMax.fromTo(element, 1, {css: {left: "100", top: "100"}}, {css:{left:"130", top: "130"}} ));
Appreciate all the help I can get, thanks!
Something like on onInit?
in GSAP
Posted
Hi there!
In the AS version there was something called onInit, I think I might need something similar. Creating a game where there's a speech bubble, it's a div that can vary in width/height, depending on the amount of content, this div is reused throughout the game. When an animation is run, onStart fires a function for replacing the content of the bubble, I give the contents of the bubble as onStartParams. The problem is, this speech bubble should always be centered (both vertically and horizontally), but this won't work the first time the animation runs, I suspect this is because the onStart runs after the tween inits.
Any way to give the onStart and onStartParams before the tween inits?