0

I'm trying to achieve a simple effect on 2 words array using the greensock engine.

It's working but the timing is off. I want them to be coordinate and with an alpha in between the simple way all I want to I just to show one word after the other in repeat and yoyo right now I almost got it it's just not a good timing.

var allnum2:Array = [text1, text2];
Timeline.appendMultiple(
  TweenMax.allFrom(allnum2, .7, {
    alpha: 0,
    repeat: 7,
    yoyo: true,
    ease:Strong.easeInOut
  }, .7)
, 1);
Florent
  • 12,310
  • 10
  • 49
  • 58
mikker
  • 5
  • 4

1 Answers1

0

I wonder how this code can work at all, since Timeline is not a class from the Greensock api.

Try this:

var allnum2:Array = [text1, text2];
var tl:TimelineLite = new TimelineLite();
tl.appendMultiple(
  TweenMax.allFrom(allnum2, .7, {
    alpha: 0,
    repeat: 7,
    yoyo: true,
    ease:Strong.easeInOut
  }, .7)
, 1);

Why are you using a TimeLine? allFrom would be enough to do your simple tween.

HDquality
  • 26
  • 1
  • Thanks for the answer and sorry ive just seen it know i figured it out, it does work you dont need to call private function to implement greensock api, timeline does work and its in as3 not js. – mikker Dec 13 '12 at 19:38