Jump to content
Search Community

RenanSantos

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by RenanSantos

  1. Can i change the elements of a timeline?
    I'm removing all canvas elements from #bg1 and then adding new ones. How can i update the existing timeline?
    var tl = new TimelineMax({paused:true})                               
                .add(new TimelineMax()
                      .staggerFromTo($('#bg1 canvas'), 2, 
                               {css: {autoAlpha:1}},
                               {css: {autoAlpha:0}
                        },.25).duration(0.7)
                 )
     

     

  2. Thanks for the answer Carl.

    I was expecting a behaviour like the css visibility or position properties, since their values are strings.

    The set method also returns NaN.

    Obj.a = "A";

    TweenMax.set(Obj, {a:"B"});

    //Obj.a = NaN

    I'm on my iPad now. I don't remember for sure if the result was NaN or if nothing happened.

  3. I'm trying to tween a custom object property with string values, but they are changed to NaN.

    Why are they been treated as number?

     

     

    .fromTo(_bg, 0.7,
                            {
                                currentBg:'bg1', 
                                curentBgType:'gradient',
                                ratio:0                            
                            },
                            {                            
                                currentBg:'bg2', 
                                curentBgType:'gdImg',                           
                                ratio:1                            
                            },0.001
                        )
     

     

  4. Shouldn't duration really change the duration?

    So, the original duration could be kept inside an internal var.

     

    Thanks for your help Carl.

    I've got it working!

    Just nested the Stagger TL with the changed duration inside a parent TL.

  5. Thanks Carl! :)

    I tested changing the duration but the only thing that changed was the TimeScale.

     

    I've got the following result:

    tl.duration(); // 1.8

    tl.duration(0.5);

    tl.duration(); // 1.8

     

    It works when i play it or change the .progress(), but the animation seems unchanged when using seek() or time().

  6. I'm creating Staggers automatically from text lines.

    Some lines contains more letters than others, so i end up with a different durations.

     

    How can i create staggers with the same duration but different number of elements?

     

×
×
  • Create New...