Jump to content
Search Community

Search the Community

Showing results for tags 'typeerror'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

  • Blog

Categories

  • Products
  • Plugins

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 5 results

  1. I'm trying to call a function inside GSAP - I'm using React, but I'm getting error in my console: App.jsx:59 Uncaught TypeError: Cannot read properties of undefined (reading 'scrollTo') This is the code: import gsap from "gsap"; import ScrollTrigger from "gsap/dist/ScrollTrigger"; import { ReactLenis, useLenis } from "@studio-freight/react-lenis"; gsap.registerPlugin(ScrollTrigger); const App = () => { const lenis = useLenis(({ scroll }) => { // called every scroll }); const [showSpan, setShowSpan] = useState(true); const mainTitleRef = useRef(null); const secondaryTitleRef = useRef(null); const wavingHandRef = useRef(null); const section1Ref = useRef(null); const section2Ref = useRef(null); useLayoutEffect(() => { pinSection(); animateTitles(); return () => { // Cleanup code when the component unmounts ScrollTrigger.getAll().forEach((trigger) => trigger.kill()); }; }, []); // Empty dependency array to run once after the initial render const pinSection = () => { // Pin the section when it enters the viewport ScrollTrigger.create({ trigger: section1Ref.current, start: "top top", end: "1200 top", pin: true, markers: true, onLeave: () => { gsap.to(section1Ref.current, { opacity: 0, duration: 1, onComplete: scrollToSection2, }); // Set opacity to 1 when entering the trigger // scrollToSection2(); // gsap.add( function(){ scrollToSection2(); } ) }, onEnterBack: () => { gsap.to(section1Ref.current, { opacity: 1, duration: 1 }); }, }); }; const scrollToSection2 = () => { lenis.scrollTo(section2Ref.current, { duration: 5 }); }; As you can see scollToSection2 is a React function. Thank you for your help upfront!
  2. Hey Team - I'm creating some GSAP parallax demos at the following url: https://livecanvas.ignitesolutions.com/smoothscroller-parallax/ I get the following error in Chrome devtools Console: caught TypeError: Cannot read properties of undefined (reading 'indexOf') at A (ScrollTrigger.min.js?ver=6.2:10:566) at K (ScrollTrigger.min.js?ver=6.2:10:1243) at $.getScrollFunc (ScrollTrigger.min.js?ver=6.2:10:35446) at new ScrollSmoother (ScrollSmoother.min.js?ver=6.2:10:5532) at r.create (ScrollSmoother.min.js?ver=6.2:10:11576) at init-smoother-demo.js?ver=6.2:4:33 I looked through a few similar forum posts but am unable to resolve. Any thoughts as to what I might be doing incorrectly? -Paul
  3. Hi. I have a GSAP animation that runs fine in all browsers (FF, IE, Chrome, Safari on Windows & Mac), but when I try to load the HTML page containing the animation from within Flash (using the HTMLLoader), TweenMax.js throws the following error: TypeError: Result of expression 'rect.style' [null] is not an object. at app:/lipide/gsap/src/uncompressed/TweenMax.js : 3408 at app:/lipide/gsap/src/uncompressed/TweenMax.js : 3414 at app:/lipide/gsap/src/uncompressed/TweenMax.js : 5414 at app:/lipide/gsap/src/uncompressed/TweenMax.js : 5430 at app:/lipide/gsap/src/uncompressed/TweenMax.js : 5435 at app:/lipide/gsap/src/uncompressed/TweenMax.js : 4754 at app:/lipide/gsap/src/uncompressed/TweenMax.js : 7091 and, of course, the animation doesn't run (in fact the whole JS engine is stopped) any ideas welcome...
  4. TurboBrad

    Draggable 1.13.2 TypeError

    Hello all! I've been using GSAP for a little over a week now and I'm loving it. Thank you for the awsome work you're doing. I upgraded from GSAP 1.13.1 to 1.13.2 this morning and began receiving the following TypeError from Firefox. TypeError: s is undefined - Draggable.js:141 I found that the "trigger" property was no longer accepting the selector string that I been using which is "#plat". Everything works great when I pass in the element or a jQuery object though so I'm just passing in the element now. I just wanted to post this incase someone receives the same error. Thanks again for GSAP!
  5. Hi. I'm creating a project that uses TweenLite to tween easel properties. Everything goes right all the time, except for when I try to user TimelineMax.insert() to insert a tween (that doesn't tween any properties, but that I add to keep a reference to the object and to add the onUpdate-events the whole time the object should be on the easel Stage) at a certain point in my code. At all the other points in my code where I use insert() to insert a tween at a certain position, everything goes right, but not at one point. I keep getting the error Uncaught TypeError: Cannot read property '_time' of null at line 564 of TimelineMax.js.. At this line this.timeline == null. I've logged the other times I use insert() and this.timeline is never null. Also, I logged the object and it's properties, and they are also all not null or undefined. I'm pretty stuck, do you have any idea? Thanks! (For reference, the insert code i use:) this.timelineMax.insert( TweenLite.to( object.easel, object.duration, { } ), object.start );
×
×
  • Create New...