Extern TweenLite/TweenMax for Haxe JS

564 views
Skip to first unread message

PRASS

unread,
Apr 3, 2013, 12:40:08 AM4/3/13
to haxe...@googlegroups.com
Hi everybody,

Just to let you know that I just released an extern for TweenLite,TweenMax,TimelineLite and TimelineMax by Greensock.

It's available on haxelib and github. The API version covered is 1.9.

Hoping that will be useful for someone, your feedbacks would be much appreciated :)


PRASS

Cambiata

unread,
Apr 3, 2013, 1:14:19 AM4/3/13
to haxe...@googlegroups.com
Great to see!
I've been looking for a timeline implementation.

As it an extern, it's JS specific, right?
Any chance to create a version that works across NME targets, or is a rewrite needed for that?

/ Jonas


david quertelet

unread,
Apr 3, 2013, 3:46:51 AM4/3/13
to haxe...@googlegroups.com
nice work !

i also gave at try at externalizing greensock's animation package .
mine is not as clean ( no comments no indentation ) .
but it provides macro includes for rapid prototyping.


talking about process, i did just convert typescripts definitions located here https://github.com/borisyankov/DefinitelyTyped/blob/master/greensock/greensock.d.ts
wich makes it very easy to do externs from there .
you just have to translate some types ,adding some haxe magic and move optional parameters ( from var ?:bool to ?var:Bool ).
there is a lot of typescript definitions here:
wich make the extern work easier for us.
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

david quertelet

unread,
Apr 3, 2013, 3:56:04 AM4/3/13
to haxe...@googlegroups.com
@cambiata
Afaik the js api mimics the as3 one .. so it wouldn't be a problem to "crossplatform" it !

tom rhodes

unread,
Apr 3, 2013, 11:49:00 AM4/3/13
to haxe...@googlegroups.com
ha! i was doing this too, not done the max versions though :)

thanks a million for those. 

@cambiata: i did a couple of things that cross compile to flash and JS using timelinelite and it works well. have an swc included in your flash project with teh classes in and use the externs in your source path and it all works out quite nicely...

Cambiata

unread,
Apr 3, 2013, 11:54:45 AM4/3/13
to haxe...@googlegroups.com
@tom: Aha! Tried it on NME neko/cpp?


tom rhodes

unread,
Apr 3, 2013, 11:58:38 AM4/3/13
to haxe...@googlegroups.com
wouldn't work on anything apart from flash and JS, there would be no real classes for you to extern on the other targets. i think you'd have to port the greensock stuff to haxe for that.

i would like to be wrong about that though :)


On 3 April 2013 17:54, Cambiata <jona...@gmail.com> wrote:
@tom: Aha! Tried it on NME neko/cpp?

Cambiata

unread,
Apr 4, 2013, 1:24:16 AM4/4/13
to haxe...@googlegroups.com
Hi guys!

Here's my take on the tweening stuff:
https://github.com/cambiata/TweenCubeHx

A quick port of the Inkora TweenCube and TweenCubeTimeline solutions, for Haxe (2.10) and NME (3.5.5).
Seems to work as expected on Flash, Html5, Neko, Windows and Android targets.

No idea about performance, memory usage etc compared to other tweening libs.
The garbage collection stuff is NOT implemented.

/ Jonas

Cambiata

unread,
Apr 4, 2013, 1:25:06 AM4/4/13
to haxe...@googlegroups.com
Forgot the link to Inkora: http://blog.inkora.com/


david quertelet

unread,
Apr 4, 2013, 3:30:26 AM4/4/13
to haxe...@googlegroups.com
@cambiata nice !
how about performance ?

Le jeudi 4 avril 2013 à 07:25, Cambiata a écrit :

Forgot the link to Inkora: http://blog.inkora.com/


Cambiata

unread,
Apr 4, 2013, 4:13:36 AM4/4/13
to haxe...@googlegroups.com, da...@postite.com
@david:

Don't have a clue! Haven't tested/compared performance at all...
Just wanted to give it a shot, because I need a cross-platform timeline implementation...
I wish actuate would have that..!

J


tom rhodes

unread,
Apr 4, 2013, 4:39:50 AM4/4/13
to haxe...@googlegroups.com

Yep. Timeline would be a great feature for actuate. As would the new slowmo ease in greensock. I'll check out this tweencube, thanks :)

niauwu

unread,
Jan 7, 2014, 8:12:47 PM1/7/14
to haxe...@googlegroups.com
How to use it in OpenFLProject of flashdevelop?
I put the tween package to src.
Main.hx
import tween.TweenMaxHaxe;


TweenMaxHaxe.to(player, 1, { x:mouseX, y:player.mouseY } );

but it show error when I run Debug/Release Flash.

ReferenceError: Error #1065: Variable TweenMax is not defined.

So how to solve it?

Thank for you answer.

tom rhodes

unread,
Jan 8, 2014, 2:43:24 AM1/8/14
to haxe...@googlegroups.com
You'll need the actual TweenMax AS3 classes available at runtime in your SWF. Either compile a swflib with them in or just include the greensock.swc. http://haxe.org/doc/flash/usingas3classes.


--

ron...@gmail.com

unread,
Jan 8, 2014, 4:56:11 AM1/8/14
to haxe...@googlegroups.com
i made those for js …



Cambiata

unread,
Jan 8, 2014, 2:40:17 PM1/8/14
to haxe...@googlegroups.com
The Greensock stuff is great - for sure!, but it might require a commercial license in some cases.
Stumbled over this TweenX lib some time ago. Seems to be a good alternative:
https://github.com/shohei909/tweenx
Examples and samples:
http://tweenx.spheresofa.net/en.html

Jonas


ron...@gmail.com

unread,
Jan 9, 2014, 4:06:51 AM1/9/14
to haxe...@googlegroups.com
wow ! very nice !
> Stumbled over this TweenX lib some time ago. Seems to be a good alternative:
> https://github.com/shohei909/tweenx
> Examples and samples:
> http://tweenx.spheresofa.net/en.html
>
> Jonas

but the cool thing about tweenMax for js is CSS3 animation acceleration

tom rhodes

unread,
Jan 9, 2014, 6:12:40 AM1/9/14
to haxe...@googlegroups.com
and the timelines


Reply all
Reply to author
Forward
0 new messages