0 Replies Latest reply on Dec 31, 2014 2:06 PM by SteeffR

    Controls of the short video

    SteeffR

      I made one page with the following code:

       

      var animationHeight = 9000;

      var stageHeight = sym.$("Stage").height();

      var scrollPos = sym.$("Stage").scrollTop();

       

       

      sym.$("body").append(sym.$("txt").css({"top":scrollPos}));

      document.getElementById("Stage_movie_1").style.top=scrollPos + "px";

       

       

      var duration = sym.getDuration();

       

       

      var percent = scrollPos / (animationHeight - stageHeight);

      var time = duration * percent;

       

       

      // Update timeline

      sym.stop(time);

      var percent_1=Math.max(0,Math.min(1,(percent-0.3)*10));

      var time_1 = Math.round(3413 * percent_1);

      if(time_1>0){

      document.getElementById("Stage_movie_1").currentTime=(time_1/1000);

      document.getElementById("Stage_movie_1").play;

      document.getElementById("Stage_movie_1").pause;

      }

       

       

      - vertical parallax effect. But it doesn't work properly.  I can see, how it's control roller run from the beginning, but picture doesn't change, even if all is downloaded. What's problem? to short video? may be it needs about 400 frames or more, but i need only 100-300? or may be i must past another numbers in "currentTime"?

       

      this page -

      Scrolling Banner

       

      thank u for answers!