Jump to content
Search Community

alessio

Members
  • Posts

    9
  • Joined

  • Last visited

alessio's Achievements

0

Reputation

  1. Hi all, i have a problem with my code. I have adding the last version of TweenMax 2.1.3 and TweenLite 2.1.3 but i have this error. Uncaught TypeError: (intermediate value).setTween is not a function at HTMLDocument.<anonymous> (scroll-ps.js:77) at j (jquery.js:3094) at Object.fireWith [as resolveWith] (jquery.js:3206) at Function.ready (jquery.js:3412) at HTMLDocument.I (jquery.js:3428) I tried to see other guides and most users have updated to the latest version. I can't understand my mistake Thx all for patients jQuery(document).ready(function() { var hand = $("#logo-pietro_p"), heart = $('#logo-pietro_i'), tl; tl = new TimelineMax(); // GSAP Star Positions for Animated Elements tl.set(heart, {scale: 0.6, yPercent: -200, opacity: 0, transformOrigin:"center center"}) .set(hand, {yPercent: 30, rotation: 6}); var controller = new ScrollMagic.Controller(); var tlHeartAnimation = new TimelineMax({paused: true}); tlHeartAnimation.to(heart, 0.7, {scale: 1, yPercent: 0, transformOrigin:"center center", ease: Sine.easeOut}, 'heartDrop') .to(heart, 0.3, {opacity: 1, ease: Sine.easeIn}, 'heartDrop') .to(hand, 0.6, {yPercent: 0, rotation: 0, transformOrigin:"left center", ease: Sine.easeOut}, 0.1) .to(heart, 0.2, {scale: 1.1, yPercent: -20, transformOrigin:"center center", ease: Sine.easeOut}, 'heartBounce') .to(heart, 0.2, {scale: 1, yPercent: 0, transformOrigin:"center center", ease: Sine.easeOut}, 'heartBounce+0.2'); var scene = new ScrollMagic.Scene({ triggerElement: "#ps-animation-logo", offset: -80, triggerHook: 'onLeave' }) .setTween(tlHeartAnimation.play()) .setTween(tlHeartAnimation.play()) .addIndicators({name: "lettera p"}) .addTo(controller); });
  2. In the site there is a part of horizontal scrolling and when you get in the cabinet the scroll becomes vertical. The scroll does not work on huawei mobile phones. I do not know what the problem is. I put the code I used for the horizontal scroll $(function(){ var $window = $(window); var scrollTime = 1.2; var scrollDistance = 300; $window.on("mousewheel DOMMouseScroll", function(event){ event.preventDefault(); var delta = event.originalEvent.wheelDelta/120 || -event.originalEvent.detail/3; var scrollLeft = $window.scrollLeft(); var finalScroll = scrollLeft - parseInt(delta*scrollDistance); TweenMax.to($window, scrollTime, { scrollTo : { x: finalScroll, autoKill:true }, ease: Power1.easeOut, autoKill: true, overwrite: 5 }); }); });
  3. @Sahil the problem is that when I move the mouse over the text, the animation should start. In chrome and firefox this does not happen. And the mistake I see is Uncaught (in promise) DOMException: play (). as if he were putting the animation on pause
  4. @Sahil thx. Autoplay when the mouse hovers over the text does not work, gives me this error: Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. Honestly I tried to fix it, but with negative outcomes.
  5. When I go on the title, we see the logo but the video does not start. If I click on the white and go with the mouse on the title, the animation starts. Why this thing? Should not the animation start immediately? Thx a lot
  6. I do not understand why the video does not start. Thx
  7. I'm experimenting with tweenmax. What I would like to do is: 1. When the mouse passes on a text, you start to see the box where the video is. 2. When the mouse leaves the text, the video resets and hides itself. 3. The procedure is repeated.
  8. @JPF @PointC Thanks for the timely answers. I will reread the docs to understand better.
  9. Hi, I'm a beginner with tweenmax and I was playing with basic animations. Instead of doing the animation with "animate" I wanted to try to animate a circle with the yoyo effect, but the animation is not central. Thanks in advance for advice.
×
×
  • Create New...