elsassph / eaze-tween

Automatically exported from http://code.google.com/p/eaze-tween - see also active fork in development: https://github.com/mayakwd/as3-eaze-tween
1 stars 0 forks source link

Looping tweens #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Would it be possible (or is it already) to provide for looping of tweens? 
Paired with the ability to chain, looping would allow some very cool tweens. 
I'm thinking something like:

eaze(arrow).to(0.5, {x:5})
     .chain(arrow).to(0.5, {x:-5})
     .loop(100)

What version of the product are you using? On what operating system?
eaze-tween 0.67

Original issue reported on code.google.com by bmj...@gmail.com on 11 Feb 2010 at 2:05

GoogleCodeExporter commented 9 years ago
I consider this a rare use case which can be solved with a little function. Not 
worth 
adding complexity in code.

Original comment by philippe...@gmail.com on 23 Feb 2010 at 11:06

GoogleCodeExporter commented 9 years ago
I realize it's possible by using two functions calling each other, I was simply 
saying 
it would be an interesting and original feature.

I understand if you think it would add unnecessary bloat, though.

Original comment by bmj...@gmail.com on 24 Feb 2010 at 12:18

GoogleCodeExporter commented 9 years ago
Only one function needed :)

function arrowLoop():void {
  eaze(arrow).to(0.5, {x:5})
     .to(0.5, {x:-5})
     .onComplete(arrowLoop);
}

PS: no need to call chain()

Original comment by philippe...@gmail.com on 24 Feb 2010 at 7:44