Jump to content
Search Community

LeClou

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by LeClou

  1. I had try it whit a second master timeline but it was not working because of the error i done whit the return fonction.

    but now it is working good. 

     

    function master1(){
    sessionStorage.removeItem("abeille");
    var timeline = new TimelineMax({repeat:0, delay:5});
    timeline.add(act1())
    .add(act1a())
    .seek(11);
    }
     
    function monster(){
    if(sesSto1==1){
    master1();
    }
    else{master();}
    }
    monster();

     

     

    Thank you every body.

  2. PointC thank you for your help but

    Just remove return and it work i know that.

     

     

    if(sesSto1==1){

    sessionStorage.removeItem("abeille"); }

    return le;

    }

     

    But i need the animation to stop at the end of act2() because in my project there is act1() to act23().
  3. I add a button to simulate the sessionStorage.setItem("abeille","1"). it is call sessionStorage on the left side of the window.

     

    if you push that button and after push the Fork button of Codepen you get  the error on the console.

     

    May be my english is not good i hope you understand.

  4. Yes well i did what you ask me, reduce 7000 lines into a few lines whit block instead of image. And i add a button so you can see what's happening when sessionStorage item have a value.

     

    Sorry may be i had to continue on the same topic!

     

    Is it some thing i am doing wrong. The logic of the code look ok it's simple and i don't understand why it's not working

     

     

    Thank you

  5. What i want to do is to open a window in the middle of an animation coming from the index. I will have ten seek() position on the timeline . I only need the first animation to be done.

     

    The index js is:

     

    $(window).load(function() {

     
    $info = $("#info");
     
    $info.click(function(){
    sessionStorage.setItem("abeille","1");
    document.location.href = "demo1.html" 
    });
    });
     
    I put a button to simulate the sessionStorage.setItem("abeille","1") done on the index.
     demo1.html=Codepen
     
    if you use that button and push the Fork button you got:
     
    Uncaught Cannot add undefined into the timeline; it is not a tween, timeline, function, or string.d.add @ TweenMax.min.js:14master @ pen.js:119(anonymous function) @ pen.js:126n.event.dispatch @ jquery.js:4430r.handle @ jquery.js:4116
     
    I also try do duplicate the master and add it  start on the "if" condition like this:
     
    function monster(){
    if(sesSto1==1){
    master1();
    }
    else{master();}
    }
    monster();
     
    Thank you for the help and exuse me for my bad english hope you can help me.
  6. Thank you for the help.

     

    I will come back to you later in the month. I realy need to open a window whit a part of the animation done, using the "seek" fonction depending on " if" condition.

    May be it is not possible! 

  7. the storage session item come from an another page the index.

     

    $(window).load(function() {
     
    $info = $("#info");
     
    $info.click(function(){
    sessionStorage.setItem("abeille","1");
    document.location.href = "demo1.html" 
    });
    });
  8. See the Pen VeLjXz by anon (@anon) on CodePen

     

    I remove most of the images and all the sounds. You won't have the bug if the sessionStorage "abeille" is not at 1.

    I also try 

     

    if(sesSto1==1){

    act1a();
    }
    else{master();}
    }
     
    it work well but I need item of the first  animation to be in place.
  9. When i trie to use a if fonction like

     

    var sesSto1 = sessionStorage.getItem("abeille");

     

    function monster(){
    if(sesSto1==1){
    master1();
    }
    else{master();}
    }
    monster();
     
    two animations start at the same time and seek() buttons don't work
     
    Uncaught Cannot add undefined into the timeline; it is not a tween, timeline, function, or string.p.add @ TweenMax.js:813master1 @ demo1.js:2315monster @ demo1.js:2900(anonymous function) @ demo1.js:2904n.event.dispatch @ jquery-1.11.0.min.js:3r.handle @ jquery-1.11.0.min.js:3
     
    I want to start the master timeline at different seek() position when the window open.
     

    See the Pen xZGVex by anon (@anon) on CodePen

     

    here is my code

    i also try to put the if in the master() like this 

     

     function master() {
     
          var timeline = new TimelineMax({
            repeat: 0,
            delay: 4
          });
          timeline.add(act1())
            .add(act1a());
          if(sesSto1==1){timeline. .seek(11);}
    }
  10. When i trie to use a if fonction like

     

    var sesSto1 = sessionStorage.getItem("abeille");

     

    function monster(){
    if(sesSto1==1){
    master1();
    }
    else{master();}
    }
    monster();
     
    two animations start at the same time and seek() buttons don't work
     
    Uncaught Cannot add undefined into the timeline; it is not a tween, timeline, function, or string.p.add @ TweenMax.js:813master1 @ demo1.js:2315monster @ demo1.js:2900(anonymous function) @ demo1.js:2904n.event.dispatch @ jquery-1.11.0.min.js:3r.handle @ jquery-1.11.0.min.js:3
     
    I want to start the master timeline at different seek() position when the window open.

    See the Pen NxqBPY by anon (@anon) on CodePen

×
×
  • Create New...