Jump to content
Search Community

Search the Community

Showing results for tags 'timelinelite'.

  • 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

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...

Joined

  • Start

    End


Group


Personal Website


Twitter


CodePen


Company Website


Location


Interests

  1. [sOLVED] IMPORTANT: When using GS with require.js dont override the GS variables like that: define(['ScrollToPlugin', 'TweenLite', 'TimelineLite'], function(ScrollToPlugin, TweenLite, TimelineLite) { // your code here }) Hello, I am doing something weird probably because I cant add Tween to Timeline. var tw = TweenLite.to(window, 0.7, {scrollTo:{y: 300}, ease:Power3.easeInOut}); console.log(tw); var tl = new TimelineLite(); tl.add( tw ); and the same when testing this way: var tl = new TimelineLite(); tl.add( TweenLite.to(window, 0.7, {scrollTo:{y: 300}, ease:Power3.easeInOut}) ); Both ways I see the error: Uncaught Cannot add [object Object] into the timeline; it is not a tween, timeline, function, or string. The output from console.log(tw) begins with: Object {vars: Object, _totalDuration: 0.7, _duration: 0.7, _delay:0, _timeScale: 1…} _active: false _delay: 0 _duration: 0.7 _ease: Object _easePower: 3 _easeType: 3 _firstPT: Object It looks like a tween anyway.. What I am doing wrong? Same code in jsFiddle is working fine. Pls. help with a hint. EDIT: I am loading all .js files with require.js (AMD loader). What is the correct way of loading GS plugins with require.js shim?
  2. I have a TimelineLite tween sequence that has an element tweening in the from the right, then later tweening off to the left with the opacity tweening to 0. Once the element's opacity tweens to 0 (on the way out) I'd like to reset the element's position to it's original position. Here's how I'm attempt to do so, which isn't working: var tl = new TimelineLite(); tl.to("#element", 1, {left: "-=50px", autoAlpha:1}) .add("elementOutLabel", "+=2") .to("#element", 0.5, {left: "-=50px", autoAlpha:0}, "elementOutLabel+=1") .set("#element", {left: "+=50px"}); } Can someone explain to me why this position reset isn't working for me?
  3. The basic of my problem is that I am using superscrollorama to pin timelineLite animations and when I want to jump to another part of the html page going up works fine but going back down is slowed down, (the anchor points are offset by part of the pixel animation that is bigger then the image so links don't go to the correct point on the page), by the animation being done in the timeline. I was hoping for a good way for setting timeline animation to be complete but I have been having problems of goto a specific frame and such. I originally tried to unpin all the pins and put them back in but that doesn't seem to do what I wanted. So now I am trying to complete the animation before I scroll to it so it gets by the pins at the fastest rate. I know you guys don't go deep into superscrollorama but I am just looking for how best to complete a timelite animation to it's final frame from a click event. Any ideas would be helpful.
  4. Hey all, Relatively fresh in the web-dev world, really enjoying using greensock! I've been working on the website for my company. One of the features of the site will be a colour chooser/builder, allowing visitors to choose/design there own variation of one of our products (Mountain Bike related in this case). The idea is, you select the colour of the component you want, and it tweens to the select colour. I need it to fade out of the current colour, then into the selected. I've got it working, although the images I have are slightly large and un-optimized at the moment. I've created a demo site here: http://goo.gl/rvuSco so you can see the effect I'm talking about. The issue I've run into, is that when a visitor first comes to the site, prior to anything occurring on the timeLine, the fade out/in tween doesn't function. It seems to just ignore it. I've come up with a fix, by forcing a dummy tween to full opacity when the page loads, but is this correct? all subsequent tweens work great, but for some reason the first one has an issue. I've commented out my fix, to illustrate the issue on http://goo.gl/rvuSco. HTML code with JS: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Go Greensock Go!</title> <link href="/GreenSockForum/css/placer.css" rel="stylesheet" type="text/css"> </head> <body> <div class="fullPage"> <div class="colourSelector"> <div id="ringDisplay"> <img id="ringImg" src="/GreenSockForum/img/ringRenders/BlackRing.png"/> </div> <div id="bashDisplay"> <img id="bashImg" src="/GreenSockForum/img/ringRenders/BlackBash.png"/> </div> <div class="bashColours"> <p>Bash Colours</p> <div class="colourBox" id="squareBlackBash"></div> <div class="colourBox" id="squareRedBash"></div> <div class="colourBox" id="squareGoldBash"></div> <div class="colourBox" id="squareGreenBash"></div> <div class="colourBox" id="squareBlueBash"></div> <div class="colourBox" id="squareSilverBash"></div> <div class="colourBox" id="squareNoneBash"></div> </div> <div class="ringColours"> <p>Ring Colours</p> <div class="colourBox" id="squareBlackRing"></div> <div class="colourBox" id="squareRedRing"></div> <div class="colourBox" id="squareGoldRing"></div> <div class="colourBox" id="squareGreenRing"></div> <div class="colourBox" id="squareBlueRing"></div> <div class="colourBox" id="squareSilverRing"></div> <div class="colourBox" id="squareNoneRing"></div> </div> </div> </div> <script type="text/javascript" src="/GreenSockForum/js/greensock/plugins/CSSPlugin.min.js"></script> <script type="text/javascript" src="/GreenSockForum/js/greensock/TweenMax.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script> $(document).ready(function() { var isAnimating = false; var tl = new TimelineLite({ onComplete: function() { isAnimating = false; } }); //tl.to("#bashImg", 0.5, {opacity:1}); //<--Required to fix issue $( "#squareBlackBash" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to("#bashImg", 0.5, {opacity:0}); tl.add(function() { $("#bashImg").hide(); $("#bashImg").attr('src','/GreenSockForum/img/ringRenders/BlackBash.png'); $("#bashImg").show(); }) tl.to("#bashImg", 0.5, {opacity:1}); }); $( "#squareRedBash" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to($("#bashImg"), 0.5, {opacity:0}); tl.add(function() { $("#bashImg").hide(); $("#bashImg").attr('src','/GreenSockForum/img/ringRenders/RedBash.png'); $("#bashImg").show(); }) tl.to($("#bashImg"), 0.5, {opacity:1}); }); $( "#squareBlueBash" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to("#bashImg", 0.5, {opacity:0}); tl.add(function() { $("#bashImg").hide(); $("#bashImg").attr('src','/GreenSockForum/img/ringRenders/BlueBash.png'); $("#bashImg").show(); }) tl.to("#bashImg", 0.5, {opacity:1}); }); $( "#squareGreenBash" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to("#bashImg", 0.5, {opacity:0}); tl.add(function() { $("#bashImg").hide(); $("#bashImg").attr('src','/GreenSockForum/img/ringRenders/GreenBash.png'); $("#bashImg").show(); }) tl.to("#bashImg", 0.5, {opacity:1}); }); $( "#squareGoldBash" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to("#bashImg", 0.5, {opacity:0}); tl.add(function() { $("#bashImg").hide(); $("#bashImg").attr('src','/GreenSockForum/img/ringRenders/GoldBash.png'); $("#bashImg").show(); }) tl.to("#bashImg", 0.5, {opacity:1}); }); $( "#squareSilverBash" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to("#bashImg", 0.5, {opacity:0}); tl.add(function() { $("#bashImg").hide(); $("#bashImg").attr('src','/GreenSockForum/img/ringRenders/SilverBash.png'); $("#bashImg").show(); }) tl.to("#bashImg", 0.5, {opacity:1}); }); $( "#squareNoneBash" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to("#bashImg", 0.5, {opacity:0}); }); $( "#squareBlackRing" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to("#ringImg", 0.5, {opacity:0}); tl.add(function() { $("#ringImg").hide(); $("#ringImg").attr('src','/GreenSockForum/img/ringRenders/BlackRing.png'); $("#ringImg").show(); }) tl.to("#ringImg", 0.5, {opacity:1}); }); $( "#squareRedRing" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to("#ringImg", 0.5, {opacity:0}); tl.add(function() { $("#ringImg").hide(); $("#ringImg").attr('src','/GreenSockForum/img/ringRenders/RedRing.png'); $("#ringImg").show(); }) tl.to("#ringImg", 0.5, {opacity:1}); }); $( "#squareBlueRing" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to("#ringImg", 0.5, {opacity:0}); tl.add(function() { $("#ringImg").hide(); $("#ringImg").attr('src','/GreenSockForum/img/ringRenders/BlueRing.png'); $("#ringImg").show(); }) tl.to("#ringImg", 0.5, {opacity:1}); }); $( "#squareGreenRing" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to("#ringImg", 0.5, {opacity:0}); tl.add(function() { $("#ringImg").hide(); $("#ringImg").attr('src','/GreenSockForum/img/ringRenders/GreenRing.png'); $("#ringImg").show(); }) tl.to("#ringImg", 0.5, {opacity:1}); }); $( "#squareGoldRing" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to("#ringImg", 0.5, {opacity:0}); tl.add(function() { $("#ringImg").hide(); $("#ringImg").attr('src','/GreenSockForum/img/ringRenders/GoldRing.png'); $("#ringImg").show(); }) tl.to("#ringImg", 0.5, {opacity:1}); }); $( "#squareSilverRing" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to("#ringImg", 0.5, {opacity:0}); tl.add(function() { $("#ringImg").hide(); $("#ringImg").attr('src','/GreenSockForum/img/ringRenders/SilverRing.png'); $("#ringImg").show(); }) tl.to("#ringImg", 0.5, {opacity:1}); }); $( "#squareNoneRing" ).click(function() { if (isAnimating) return; isAnimating = true; tl.to("#ringImg", 0.5, {opacity:0}); }); }); </script> </body> </html> My hack-job lovely css: * {margin:0;} html,body {height: 100%;} .fullPage { position: relative; height:100%; width:100%; box-shadow: 0px 2px 10px; background-color: #FFFFFF; background-image:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnICB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+Cgk8cmFkaWFsR3JhZGllbnQgaWQ9J2cnIGdyYWRpZW50VW5pdHM9J3VzZXJTcGFjZU9uVXNlJyBjeD0nMCcgY3k9JzAnIHI9JzQyJSc+CgkJPHN0b3Agb2Zmc2V0PScwJScgc3RvcC1vcGFjaXR5PScwJyBzdG9wLWNvbG9yPScjMDAwMDAwJyAvPgoJCTxzdG9wIG9mZnNldD0nMTAwJScgc3RvcC1vcGFjaXR5PScxJyAgc3RvcC1jb2xvcj0nIzY2MmYyZicgLz4KCTwvcmFkaWFsR3JhZGllbnQ+Cgk8cmFkaWFsR3JhZGllbnQgaWQ9J2cyJ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eD0nMCcgeT0nMCcgd2lkdGg9JzExMCUnIGhlaWdodD0nMTEwJScgZmlsbD0ndXJsKCNnMiknLz4KPC9zdmc+'); } .colourSelector { text-align:center; position: relative; background-color: #0c0ceb; background-image:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScyNzYnIGhlaWdodD0nMjc2JyB2aWV3Qm94PScwIDAgMjc2IDI3Nic+Cgk8ZGVmcz4KCQk8cGF0dGVybiBpZD0nYmx1ZXN0cmlwZScgcGF0dGVyblVuaXRzPSd1c2VyU3BhY2VPblVzZScgeD0nMCcgeT0nMCcgd2lkdGg9JzU1LjInIGhlaWdodD0nNTUuMicgdmlld0JveD0nMCAwIDExMC40IDExMC40JyA+CgkJPHJlY3Qgd2lkdGg9JzExMCUnIGhlaWdodD0nMTEwJScgZmlsbD0nIzBjMGNlYicvPgoJCQk8cGF0aCBkPSdNMSwxaDExMC40djExMC40aC0xMTAuNHYtMTEwLjQnIGZpbGwtb3BhY2l0eT0nMCcgc3Ryb2tlLXdpZHRoPScxLjc4JyBzdHJva2UtZGFzaGFycmF5PScwLDIsMicgc3Ryb2tlPScjZmZmZmZmJy8+CgkJPC9wYXR0ZXJuPiAKCQk8ZmlsdGVyIGlkPSdmdXp6JyB4PScwJyB5PScwJz4KCQkJPGZlVHVyYnVsZW5jZSB0eXBlPSd0dXJidWxlbmNlJyByZXN1bHQ9J3QnIGJhc2VGcmVxdWVuY3k9Jy4yIC4zJyBudW1PY3RhdmVzPSc1JyBzdGl0Y2hUaWxlcz0nc3RpdGNoJy8+CgkJCTxmZUNvbG9yTWF0cml4IHR5cGU9J3NhdHVyYXRlJyBpbj0ndCcgdmFsdWVzPScwJy8+CgkJPC9maWx0ZXI+Cgk8L2RlZnM+Cgk8cmVjdCB3aWR0aD0nMTAwJScgaGVpZ2h0PScxMDAlJyBmaWxsPSd1cmwoI2JsdWVzdHJpcGUpJy8+CjxyZWN0IHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnIGZpbHRlcj0ndXJsKCNmdXp6KScgb3BhY2l0eT0nMC4xOCcvPgo8L3N2Zz4K'); height:85%; width:60%; margin-left:20%; top:10%; border-radius:50px; box-shadow: 5px 5px 20px; } .ringColours { color:white; position: absolute; height:90%; width:40px; right:5%; top:5%; } .bashColours { color:white; position: absolute; height:90%; width:40px; left:5%; top:5%; } .colourBox { position:relative; margin-top:7%; width:40px; height:40px; border: 2px solid white; } .colourBox:hover { border: 4px solid yellow; } #ringDisplay { max-width: 500px; position:absolute; left:-10%; right:0; top:5%; bottom:0; margin:auto; } #bashDisplay { max-width: 500px; position:absolute; left:-10%; right:0; top:5%; bottom:0; margin:auto; } #squareBlackBash {background-color: black;} #squareBlueBash {background-color: blue;} #squareRedBash {background-color: red;} #squareGoldBash {background-color: gold;} #squareGreenBash {background-color: green;} #squareSilverBash {background-color: silver;} #squareBlackRing {background-color: black;} #squareBlueRing {background-color: blue;} #squareRedRing {background-color: red;} #squareGoldRing {background-color: gold;} #squareGreenRing {background-color: green;} #squareSilverRing {background-color: silver;} Thanks in advance for any assistance. It's working, so I guess its ok to do the dummy tween initially, but I was just wondering if there was a better way to do it. Also, any other hints/tips/tricks/recommendations are greatly appreciated! Cheers! ~Ronen
  5. I actually started this topic in another thread but decided it needed a more appropriate title and separate thread. It seems as though the animations are not working or displaying properly under iOS 5.X and Safari desktop 5.X. I'm currently using the latest GSAP files (from CDN). I've tried using this but to no avail: TweenLite.ticker.useRAF(false); I have no idea what to try next. You can see how I'm stringing together the timelines in Matchups.js build(). I can rip them out and put them in the post if that helps. Please let me know. Most of the view is blank under iOS 5.X and Safari desktop 5.X. Reference URL: http://capone-dev.to....com/#/matchups
  6. Hello i have a question, is possible add new tweens to a TimelineMax and reorder another on the fly (dynamically). Example: timeLine = new TimelineMax(); timeLine.add( TweenMax.to(".box1", 1, {left:100}) ).addLabel("box1"); timeLine.add( TweenMax.to(".box2", 1, {left:100}) ).addLabel("box2"); After in need add a new TweenMax after box1 but i need that box2 run after the box3 tween = TweenMax.to(".box3", 1, {left:100}); timeLine.add(tween, "box1"); timeLine.play(); RESULT: Currently the box2 and the box3 run at the same time. Another test, was get 'box2' tween and use UpdateTo() to add delay:1 but UpdateTo dont work with delays. Some idea?
  7. VJ90102

    debugging advice

    [see "Why can't code be in <head>?" thread as the problem has been pinned down to putting the timeline in the <head> and .play() in the <body>] Been using jQuery animation and am new to GSAP. I created a TimelineLite animation on a standalone page. The page includes all the scripts and style resources used by my live website so I could check for conflicts. It ran fine -- animation was mostly opacity changes. I put the script into my test site. [uPDATE: On the test site I use a JS closure to encapsulate the TimelineLIte animation -- this seems to be the problem]. I see the text and image resources but nothing is animated until it hits the onComplete on the last line. That calls a TweenLite.to() outside the TimeLineLite to fade everything out. I stepped through the GSAP code (min version) on the test site and it seems to be running through all the steps in the animation. For instance, in TimelineLite.min.js the value of "this._totalDuration" is the total length of all the durations and delays added up. In the TweenLite.min.js code the value "e.id" takes on the values of each of my selectors as it loops around. Yet the screen shows nothing happening. I'm using this resources. <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenLite.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TimelineLite.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/plugins/CSSPlugin.min.js"></script> Any tips on debugging a problem like this [closure]? Is there a line in TweenLite.min.js I can set a breakpoint on and see what is really going on?
  8. I am currently working on a project that makes use of the TimelineLIte to sequence some animations together. While testing, I discovered that only in IE9 (havent tested in 10) that the timelines do not complete their transitions for 3 elements. If you haver over the elements, then you see them finish. Visit the URL below (please respect the fact that this is a dev link) and click on any number from 1-8 (on the bottom of the page).... in IE9, the Winner banner the percentage cells do not fully reach full opacity. I could really use some assistance working through this problem. Thank you in advance. Reference URL: http://capone-dev.toolofnadrive.com/#/matchups
  9. I am trying to make it so that I can change the ease type on the contained tweens of a timeline without remaking the timeline to do so. Is this possible?
  10. As I understand it, a Timeline is set up so that it uses the values of variables at the time the timeline is created. Thus, if n=100 tl.to(mc,1,{x:n}); will move mc to x = 100. What happens if I do var n:int = 100; tl.addCallback(function() {n = 200}); tl.to(mc,1,{x:n}); More importantly, what if I want the timeline to use values that are determined at the time the timeline plays? (Yes, I could do a test of above, but I'm trying to understand this once and for all, conceptually — I'm setting up complex timelines with many moving parts and subcalls, and trying to understand what is called/evaluated now and what is called/evaluated later). Thanks for any insight(s)!
  11. If one has has a long timeline with various 'sections', which one could delineate by labels, what is the best way to know when it has played through a section? Is there a way to 'listen' for a tlmeline passing through labels — or is the best way to add a callback at the end of each section which would dispatch an Event? PSEUDO CODE _timeline.addLabel('start section 1',_timeline.totalDuration()); _timeline.to(...); _timeline.addLabel('end section 1',_timeline.totalDuration()); // can I detect when this passes? _timeline.addCallBack(dispatchAnEvent(finishedSection1),_timeline.totalDuration()); // or is this the only way? Thanks for any help.
  12. Simple question regarding TimelineLite / TimelineMax .add() with Stagger: Is it necessary to do this: tl.add([tween, tween, tween], "+=5", "normal", "stagger", 5); // shown in documentation example or would you do this: tl.add([tween, tween, tween], "+=5, "normal", 5); // what I would expect to do
  13. var duration = 0.65; var tl = new TimelineLite({onComplete: function(){ tl.reverse(); }}); tl.addLabel(labels[0], 0); tl.appendMultiple([new TweenLite(help, duration, { _alpha: 0, delay: 3 }), new TweenLite(year, duration, { _alpha: 100, delay: 3 }) ]); tl.addLabel(labels[1], duration*1); // first stop tl.appendMultiple([new TweenLite(dragger, duration, { _x : getXFor(arr[1]), ease: Strong.easeOut }), new TweenLite(year, duration, { _x : getXFor(arr[1]), ease: Strong.easeOut }) ]); tl.addLabel(labels[2], duration*2); // 2nd stop tl.appendMultiple([new TweenLite(dragger, duration, { _x : getXFor(arr[2]), ease: Strong.easeOut }), new TweenLite(year, duration, { _x : getXFor(arr[2]), ease: Strong.easeOut }) ]); tl.addLabel(labels[3], duration*3); // 3rd stop tl.appendMultiple([new TweenLite(dragger, 0.5, { _x : getXFor(arr[3]), ease: Strong.easeOut }), new TweenLite(year, 0.5, { _x : getXFor(arr[3]), ease: Strong.easeOut }) ]); hi guys, im having a problem with tl.gotoAndPlay(label[0]). is there something im doing wrong here? thanks, Carlos
  14. I am getting this issue where if the progress() gets set to something below 0 it goes to the end of the timeline. Is this supposed to happen?
  15. Hello. Thanks for the priceless GSAP. However, not sure why stagger isn't honoured with this code: function getButtonsInAnimation(callback) { var i, spots, spot, tween = new TimelineLite({paused: true, onComplete: callback}); for(i in spots = shuffle(hotspots)) { spot = spots[i]; tween.add(TweenLite.fromTo(spot, 0.3, {scale:0, alpha:0, left:290, top:168}, {scale:1, alpha:1, left:parseInt(spot.css('left')), top:parseInt(spot.css('top')), ease:Expo.easeOut} ), undefined, 'start', 0.05); } return tween; } As you can see, I'm adding new TweenLite object with TimelineLite.add() method. But it executes added tweens in sequence, ignoring the stagger value. Also tried to pass stagger value to the TimelineLite constructor. Same result. As of position property of TimelineLite.add() method, I also tried values, without any luck: '+=0', 0, false. Is there something I misunderstand?
  16. Hi, there— I'm hoping someone can help suss out what I'm doing wrong. I have a page that has 2 blocks of content with a couple of <li> elements to toggle between the two, like tabs. I'm using TimelineLite to show the first block, and—when toggling to the other block—TweenMax to hide the first block's elements and TimelineLite to transition in the second block's. What happens is page loads, first block appears. Toggle to 2nd block. 1st block is hidden, 2nd block appears. When I toggle back, 2nd block is hidden, 1st block appears BUT proceeds to disappear; it doesn't stay visible. The parent, #section0 is set visibility: hidden in the css and I'm using TimelineLite and TweenMax to do the hiding/revealing of the children only. For simplicity sake, I'll show only TimelineLite's first element being tweened. var tl0 = new TimelineLite(); tl0.to($('#section0 h2'), 1.2, {autoAlpha: 1, ease:Power2.easeOut}); //then my click handler: $('#subNav').on('click', 'li:not(.selected)', function() { $('#subNav li').removeClass('selected'); $(this).addClass('selected'); var idx = $('#subNav li.selected').index(); switch(idx) { case 0: //hide block 2, then show block 1 TweenMax.to($('#section1 h2'), 0, {autoAlpha: 0, overwrite:'all'}); var tlA = new TimelineLite(); tlA.to($('#section0 h2'), 1.2, {autoAlpha: 1, ease:Power2.easeOut}); //Block 1 then disappears. break; case 1: //hide block 1, then show block 2 TweenMax.to($('#section0 h2'), 0, {autoAlpha: 0, overwrite:'all'}); var tlB = new TimelineLite(); tlB.to($('#section1 h2'), 1.2, {autoAlpha: 1, ease:Power2.easeOut}); break; default: break; } }); Thank you in advance! —Victor
  17. Hi guys I'm using TimelineLite to animate an html5 banner and I'm having trouble with one of the lines: here is my code: panel.animate = function () { var _tweenTime = this._tweenTime, _staggerTime = this._staggerTime, _frameTime = this._frameTime, _carTime = 5; this._timeline // frame 1 .to(expTxt0, _tweenTime, { alpha:0, ease:Power2.easeIn }, _frameTime) .to(expTxt1, _tweenTime, { alpha:1, ease:Power2.easeOut }) // frame 2 .to(expTxt1, _tweenTime, { alpha:0, ease:Power2.easeIn }, _frameTime) .staggerTo([ expTxt2, expTxt3, expTxt4, expTxt5, expTxt6, expTxt7, expTxt8 ], _tweenTime, { alpha:1, ease:Power2.easeOut }, _staggerTime) .to(renaultLogo, _tweenTime, { alpha:1, ease:Power2.easeOut }); // car animation this._timeline.add([ new TweenLite(car, _tweenTime * 2, { alpha:1, ease:Power2.easeOut } ), new TweenLite(car, _carTime, { left:373, top:158, scaleX:1, scaleY:1, ease:Power2.easeOut } ), new TweenLite(wheel0, _carTime, { rotation:"720", ease:Power2.easeOut }), new TweenLite(wheel1, _carTime, { rotation:"720", ease:Power2.easeOut }) ], 0); }; the line in question is the first line under the // frame 2 comment: .to(expTxt1, _tweenTime, { alpha:0, ease:Power2.easeIn }, _frameTime) In actionscript I would expect this to fade the expTxt1 <img> back down (after fading it up on the previous line). I've tried setting overwrite:false (not sure if that's a thing) and switching between using opacity and alpha but i can't think of anything else to do to make the code work. Can anyone see if I'm missing something please? Thanks obie
  18. Ok, I am pretty new to this flash / actionscript so please help me get on track... I am trying to do the following: FirstSwf -- contains a timelinemax that animates a text from left to right SecondSwf -- contains a X number of photos that fade in and fade out with Y animation duration (number of images is dynamically parsed via XML configuration) ThirdSwf -- contains a timeline that animates a text from bottom to top (sort of like credits screen) Main.swf -- This is where I am stuck. I want to load the three SWF's into a master timeline inside main.swf and than sequentially play them one by one. I am able to load these swf's using LoaderMax but I can't seem to figure out two things: 1. How do I play them in sequence? 2. How do I control the sub timelines (within these external swf's) via the master timeline? Any help would be appreciated! Thanks
  19. Hi Forum-goers, I am completely new to this platform and am having a few issues getting my timeline to run all objects at the same time. In my code I am simultaneously running another plugin that counts up numbers, which you can ignore, but I have included in the code any how. What I want to achieve is that all of the bars in the chart animate out at the same time. Any help would be great : ) $(function() { var tl = new TimelineLite({align: "start"}); tl.to( $(".bar1"), 0.5, {css:{width:"200px"}, ease:Strong.easeInOut}); $('.percentage1').countTo({ from: 0, to: 75, speed: 3300, }), tl.to( $(".bar2"), 0.5, {css:{width:"150px"}, ease:Strong.easeInOut}); $('.percentage2').countTo({ from: 0, to: 50, speed: 3300, }), tl.to( $(".bar3"), 0.5, {css:{width:"125px"}, ease:Strong.easeInOut}); $('.percentage3').countTo({ from: 0, to: 35, speed: 3300, }), tl.to( $(".bar4"), 0.5, {css:{width:"100px"}, ease:Strong.easeInOut}); $('.percentage4').countTo({ from: 0, to: 25, speed: 3300, }), tl.to( $(".bar5"), 0.5, {css:{width:"75px"}, ease:Strong.easeInOut}); $('.percentage5').countTo({ from: 0, to: 15, speed: 3300, }), tl.to( $(".bar6"), 0.5, {css:{width:"50px"}, ease:Strong.easeInOut}); $('.percentage6').countTo({ from: 0, to: 2, speed: 3300, }); tl.play() }); If answering this is easier if you see the HTML, I have hosted that here: http://yaocho-digital.com/customerhub/popular-sizes.html
  20. I'm trying to create an animation (timelineLite animation) that can be controlled by a scrollbar or scrubber. a perfect example of which, is the demo swfs on the TimelineLite page as well as the TimelineMax page. The scrollbar has to allow the viewer to play the animation forward and scrub the animation in reverse. Thanks in advance!
  21. Below is a snippet of part of a timeline I building using TimelineLite. There are parts before and after this sequence but this one part is giving me some trouble: timeline.insertMultiple( [ 'discharge', function () {charge.hide();}, TweenLite.to(wave, 0.25, { ease: Linear.easeNone, raphael: { r: 1, 'fill-opacity': 0, 'stroke-width': 1 } }), ], 0, 'sequence', 0); If I call timeline.play('discharge'), the function is not called - only the tween runs. I have functions in the timeline in other places but they are always after the animation and run as expected. The only way I could get this to work was to move the function to the onStart callback of the animation: timeline.insertMultiple( [ 'discharge', TweenLite.to(wave, 0.25, { ease: Linear.easeNone, raphael: { r: 1, 'fill-opacity': 0, 'stroke-width': 1 }, onStart: function () {charge.hide();} }), ], 0, 'sequence', 0); Is there something I'm missing to make this work. My first thought was that I'm adding two 0 duration items to the timeline and the playback is just starting at the first item with a real duration. I don't mind using the onStart callback but I was trying to see how flat I could keep this so I can see the sequencing of the all the processing in a consistent fashion. If anyone has ideas/alternatives, I'd be interested in your thoughts. I can provide a link to the full source and/or working demo if needed.
  22. I know you can set a defaultEase for TweenMax, but how can I set it for a TimelineMax? I've tried... var tl = new TimelineMax({defaultEase:Power2.easeInOut}); ...and other variations but nada happens. Is it possible? Thanks
  23. Hi everyone! I have been using GSAP flawlessly for my personal projects quite a while now. Recently, I found strange behavior of the TimelineLite class. Sometimes, when I add callback at the end of the timeline it occasionally fires twice. I have been trying to solve this for a whole day now and I am starting to believe this must be some sort of a bug in TimelineLite class. I found out, looking at the stack trace, that whenever this redundant calls happens, the callback gets called in the forceChildrenToEnd method, but the same callback has already been called in its regular callback time. Has somebody experienced this? Maybe there is some kind of workaround to make sure my callbacks won't fire twice (disable forceChildrenToEnd?) ? Thanks, Jan
  24. I'm working on a slide show application in javascript and got all things separated on different files but more or less this is what i'm doing: var tl = new TimelineLite(); tl.insert(TweenLite.to($('.container'), 0.5, {css:{marginLeft:'-=100px'}, ease:Power2.easeOut, delay:0.2})); tl.insert(TweenLite.to($('.container'), 0.5, {css:{autoAlpha:1}, delay:0.7})); Afterwards I reverse the timeline and add a callback to the end of the reversed timeline with call() tl.reverse(); tl.call(someFunction); The animation plays reversed but the someFunction function never gets executed? Am i doing something wrong Thanks in advance
  25. flag468x90.zipHi all While trying out the new v12 GSAP with a small 468x90 banner I noticed the background image shifts a few pixels, like a quick snapping movement once it starts to loop via a label in the timelinelite. Why is this happening? The bg image is img_fundo_mc. Thanks for your help. The code: import com.greensock.*; import com.greensock.easing.*; var tl:TimelineLite = new TimelineLite({onComplete:loopBackground}); tl.append( TweenLite.from(img_flag_mc, .5, {x:"-=100", ease:Power4.easeOut}) ); tl.append( TweenLite.from(img_cursos_mc, .5, {y:"-=100", ease:Power4.easeOut}) ); tl.append( TweenLite.from(img_saber_mc, .5, {alpha:0, ease:Power4.easeOut}) ); tl.append( TweenLite.from(img_fundo_mc, 1, {alpha:0, ease:Power4.easeOut}) ); tl.insert( TweenLite.to(img_fundo_mc, 2, {x:-13, y:-16, scaleX:0.75, scaleY:0.75, rotation:-10, ease:Power3.easeInOut}), "loop"); tl.append( TweenLite.to(img_fundo_mc, 2, {x:-69, y:-168, scaleX:0.90, scaleY:0.90, rotation:10, ease:Power3.easeInOut}) ); tl.append( TweenLite.to(img_fundo_mc, 2, {x:0, y:0, scaleX:1.0, scaleY:1.0, rotation:0, ease:Power3.easeInOut}) ); function loopBackground():void { tl.play("loop") }
×
×
  • Create New...