TweenerHX and what else it can do

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

TweenerHX and what else it can do

Nathan Huesken
Hello dear haXe guys,

I am trying to figure out, if TweenerHX is the right thing for me.
Features, I can not find but need are:
- Setting an arbitrary transition function (one that I write myself)?
- Starting the time not by 0?

The second thing I need, is because at some point I might have to start a Tween a little late, but I want it to be time-exact.

Thanks,
Nathan

--
 ____________________________________
/  This game lends itself to certain \
| abuses.                            |
|                                    |
\ --- Calvin                         /
 ------------------------------------
       \   ,__,
        \  (oo)____
           (__)    )\
              ||--|| *

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TweenerHX and what else it can do

Baluta Cristian
Hello.

- yes, you can pass a function instead a string for the transition. internally, right after you pass the transition string, will store a reference to the corresponding equation. so you need to start writing your own equation from an existing one, it may not work if you don't have the exact number of parameters.
- i think you're talking about the delay, you simply write {delay:1}, in seconds.


On Thu, Aug 6, 2009 at 8:13 PM, Nathan Huesken <[hidden email]> wrote:
Hello dear haXe guys,

I am trying to figure out, if TweenerHX is the right thing for me.
Features, I can not find but need are:
- Setting an arbitrary transition function (one that I write myself)?
- Starting the time not by 0?

The second thing I need, is because at some point I might have to start a Tween a little late, but I want it to be time-exact.

Thanks,
Nathan

--
 ____________________________________
/  This game lends itself to certain \
| abuses.                            |
|                                    |
\ --- Calvin                         /
 ------------------------------------
      \   ,__,
       \  (oo)____
          (__)    )\
             ||--|| *

--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TweenerHX and what else it can do

gershon
not sure i understand this correctly, and i'm using feffects...

but if in (1) you mean you want to do more with the tween value,  this is what i do:

instead of:

var t = new feffects.Tween(0, 100, 1000, someObj, "x", feffects.easing.Linear.easeNone);
t.start();

you can do:

var t = new feffects.Tween(0,1,1000);
t.setTweenHandlers(function(v){
someObj.x = 100*v;
// do something else here with v, which goes linearly from 0 to 1 in 1000ms
});
t.start();

if you mean a custom equation, i guess yeah, write your own...

and for (2) can use the builtin Timer class:

haxe.Timer.delay( t.start, 1000);


i moved to feffects after TweenerHX gave me some issues...

On Thu, Aug 6, 2009 at 11:29 PM, Baluta Cristian <[hidden email]> wrote:
Hello.

- yes, you can pass a function instead a string for the transition. internally, right after you pass the transition string, will store a reference to the corresponding equation. so you need to start writing your own equation from an existing one, it may not work if you don't have the exact number of parameters.
- i think you're talking about the delay, you simply write {delay:1}, in seconds.


On Thu, Aug 6, 2009 at 8:13 PM, Nathan Huesken <[hidden email]> wrote:
Hello dear haXe guys,

I am trying to figure out, if TweenerHX is the right thing for me.
Features, I can not find but need are:
- Setting an arbitrary transition function (one that I write myself)?
- Starting the time not by 0?

The second thing I need, is because at some point I might have to start a Tween a little late, but I want it to be time-exact.

Thanks,
Nathan

--
 ____________________________________
/  This game lends itself to certain \
| abuses.                            |
|                                    |
\ --- Calvin                         /
 ------------------------------------
      \   ,__,
       \  (oo)____
          (__)    )\
             ||--|| *

--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org