It looks like that library works on Flash or HTML5, but not other targets. If you target HTML5, it appears you also need to include an additional JavaScript file, something such as:
<dependency path="path/to/gsap.js" />
You might also consider using Actuate, a popular tween library that is compatible with all of OpenFL’s target platforms
I was wondering… did you ever get GSAP to work, Stortof?
I followed the same steps that you did, and used in my project.xml file as singmajesty suggested, but still no love.
I’ve been SCOURING the interwebs and still can’t get it to work!
I’ve been tearing my hair out about it… one hair at a time.
I fear I may be bald by the weekend. LOL!
NOTE: I suspect the issue has something to do with “import” in my Main.hx file (the same way you would import actuate: import motion.Actuate;), but I have no idea how to do that.
This library is Haxe externs only – this means it will work only for JavaScript, and only if you use <dependency path="to/gsap.js" /> in your project file, or something similar to be sure that the GSAP library is embedded in the final HTML page you are running
Oh – are you using it with Haxe getter/setter properties?
Perhaps you could try tweening a custom value, just to double check:
private var value:Int = 0;
...
TweenMax.to (this, 4, { value: 100 });
addEventListener (Event.ENTER_FRAME, function (_) trace (value));
Trying to tween sprite.x or sprite.alpha may not work with the Haxe version of OpenFL (the non-NPM version) because there are no real x or alpha properties, only get_x, set_x, get_alpha, set_alpha, etc.
Actuate is designed to check for this automatically when tweening
I’m about to crash (and burn) right now, @gig, so I won’t be able to get to it until tomorrow, but you are right there with me: Timelines are the very next step!
I’m very hopeful after this “A-HA!” moment!
I’ll be sure to let you guys know what happens.