en en en en en en en en en en en en en en en en fa en en fr hbs_lat en en en es en en en ms en de en fr en en en ca en en en en en en en en en en en en en en en en en en en en en en en fa en en fr hbs_lat en en en es en en en ms en en en en en en en en en en en en en fi fi en en en en en en en en en en en en en de de en en en en en en en en en ca en en en en en en en en en ca en en en en en en en en en en en en en en en en en en en ca en en en en en en en en en en tr en en en en en en en en en nl en en es fr en en en en en en en ja fr de fr es nb fr de en en en fr en en en en en en en en en en en en en en en en en en en en es fr nb en es fr en en en en en en en en en en en en en en nb en en en en en en en en en en en en nb en en en es en en en en en es en nb en es en fr en en en en en es en en en en en en en en nb en en en nl en en en en en en en en nb en en en en en en en en en es en nb en es en en en en en en en es en en en en en en es en nb en es en fr nl en en en en en es en en en en en en en en nb en en en en en en en en en es en en en en en en en en nb en en en en nl en en en en es fr nb en es fr en en en en en en es en en en en en en en es en nb en es en en en en en en en en en nb en en en ru it en en en en en es en en en en en en en en en en en en en en en nb en en en id en en en en en en ru nb en en ru en en ja fr de fr es nb fr de en en en en en en fr en en en de en en en en en en en de en en en en en en en en en en en fr cv es tr es en en en en ms en en en en en en fr en hbs_lat en en en en en en en fr cv es tr es en en en en de en en en ca en en en en en
There are no results to display.
All of my search term words
Gabriel posted a topic in GSAP
This code works fine on the first loop, and not on the second: var tl = new TimelineMax({repeat:-1}) tl.fromTo(tx4,1,{skewX:-40, x:b.width},{skewX:0, x:0, ease:Linear.easeNone},'-=0.5') .to(tx4,0.5,{transformOrigin:'center bottom', skewX:70, scaleY:1.5, ease:Power2.easeOut},'-=0.1') .to(tx4,0.5,{skewX:-45, scaleY:1.25, ease:Power2.easeOut},'-=0.1') .to(tx4,0.5,{skewX:0, scaleY:1, ease:Back.easeOut},'-=0.1') How can I fix this?   No matter how many times I run into this problem, it never seems to sink in. Looping timelines are so unintuitive in gsap that I could pull my hair out. It's soooo easy to do whatever you want with a timeline, but the moment you try to repeat it, it becomes soooo frustrating. It shouldn't even be called "repeat", because that would lead you to believe it's going to do the same thing it did the first loop. And I already know I'm going to get several responses explaining why this is so great and expected, smh
Animation interruption, then resetting that timeline.
I have two timelines.. tl1, tl2 for demonstration purposes. tl1 starts when the dom is ready. tl2 starts via button click. There is another button that reverses everything to where tl1 starts. The problem I have is that if the button that starts tl2 is clicked before tl1 is finished, then someone clicks the button that reverses the timelines to the start of tl1, then tl1 is reversed to the point where the interruption happened. How can I tell the button that reverses everything back to tl1 to go all the way back to zero?
cerulean posted a topic in GSAP (Flash)
timeline skips after initial play
d4rklit3 posted a topic in GSAP
I have timelines in my site which have animations added to them in sequence. The first time i play a particular timeline it plays fine, any time after that it skips whatever is in the first .add() or it just skips the first label .. I am not even sure how to describe this. One example is that I have an abstract that defines a sitesection (SectionViewBase). on the transitionin function it creates a timeline ads the global transition for each section and then there is a transitionInComplete function that is overwrote by the childclass that subclasses SectionViewBase. the override will return a new timline or tweenlite instance that is the transitionin of the specific section content. ANyways, the first time I do this its fine, however the second time it skips that initial .add() call and just plays whatever it gets from transitionInComplete(). Each time this tranistionIn function runs, however, it recreates the timeline. Any suggestions? Thanks.
TimelineMax delayedCall a function with other TweenMax
FAKS posted a topic in GSAP (Flash)
Hello, I'm using the TimelineMax ans it works great. But I have a problem with something. I want to use a delayedCall function. In this function, I have other tweenMax. Something like this : var tl:TimelineMax = new TimelineMax(); tl.insert(TweenMax.to(camion, 8,{x:700, ease:Linear.easeNone})); tl.insert(TweenMax.to(nuage, 20,{x:"-100", ease:Linear.easeNone})); tl.insert(TweenMax.delayedCall(3,enleverTexte)); // function enleverTexte() { TweenMax.to(txt1, 0.7,{y:"-40", alpha:0, ease:Quint.easeIn}); TweenMax.to(txt2, 0.7,{y:"-40", alpha:0, ease:Quint.easeIn, delay:0.2}); } Now, I want to start my animation with a gap starting. Like this : tl.currentTime = 5; Normaly, I should not see the movieClip txt1 ans txt2 when my animation start (because I launch the animation at 5 seconds, and inside my timeline I hide the mc txt1 and txt2 at 3 seconds). But it doesn't works... When the animation start, even if I start at 15 seconds, I see the mc txt1 and txt2 and the function enleverTexte() is executed... How can I do this kind of manipulation ? Thank you.
function with other tweenmax
Having trouble playing loaded MP3 from TimelineMax??
cerulean posted a topic in Loading (Flash)
I have a function set up to play a loaded MP3 by name string: protected function playSoundByName($name:String):void { // trace("play sound by name ", $name, LoaderMax); _currentSound = LoaderMax.getContent($name); // trace("current sound is ",_currentSound); if (_currentSoundChannel) _currentSoundChannel.stop(); // trace("the sound is ", _currentSound,_currentSound.length,_currentSound.url); _currentSoundChannel = _currentSound.play(0); _currentSound.addEventListener(Event.SOUND_COMPLETE,soundComplete,false,0,true); } Which works fine when I call it directly, but not when I call it from a callback in a TimelineMax (see below -- the first call works fine, the one from inside the TLM does not). I'm sure I'm missing the obvious, but it's a big problem…Thanks… var introSoundsTL:TimelineMax = new TimelineMax({ease:Linear.easeNone}); playSoundByName("jsTexasSurf"); // works! introSoundsTL.addCallback(playSoundByName,0,["jsTexasSurf"]); // the sound from LoaderMax.getContent() in called function is null! (The loaded xml is in this form:               )
Constant motion Timeline ?
cerulean posted a topic in GSAP (Flash)
I have a situation where I want to have a number of objects tweening from different starting points towards a common goal. They are moving in the same direction, and should move at the same pace. I also want to get rid of the object when it reaches its goal, and add a new one (or the same one) at the back of the queue. Picture a line of people moving forward in a queue: they shuffle forward slowly, all at the same speed. We start the queue with a line already formed, that is, we 'open the scene' with the line in place. Is there a way to do this with TimelineMax? I had thought of something like this _mainTimeline.to(_people,TIME,{z:"+=1000"},"+=1"); But they won't all end up at the same end point. If I substitute a fixed end point (i.e. z:1000) then they won't move at the same pace, since they distance they must cover is different. I also need to figure out a way to keep adding and removing from the queue. I suppose the answer might be to maintain an array of TweenMax's, or simply to do old-school ENTER_FRAME +='s, but I very much like the robustness of TimelineMax
What could set TimelineMax.duration() == 0 ?
cerulean posted a topic in GSAP (Flash)
I've solved this, but I have no idea how, and I'm trying to understand what happened. I have TImelineMax's set up in a class. One of them is this, super-simple -- I use it to have a person 'escaping' or not escaping -- if they are escaping, they move off screen, if you click, the timeline is reversed and they come back. Instantiations of this class are being moved in z-space forwards, in a timelinemax which contains repeat = -1 tweenmaxes (as per Carl's great help) -- when the person disappears off screen in the distance I reset this timeline to get them not escaping anymore. I was using gotoAndStop(0) but now am using seek(0), pause() -- the reset can happen while the timeline is moving forwards, or reverse. _escapeString = Math.random() > .5 ? "+=" + ESCAPE_DISTANCE : "-=" + ESCAPE_DISTANCE; _escapeTimeline = new TimelineMax({paused:true,onStart:tlStart,onComplete:tlComplete,onReverseComplete:tlReverseComplete,ease:Linear.easeNone}); _escapeTimeline.add(new TweenMax(this,ESCAPE_TIME,{x:_escapeString,ease:Linear.easeNone})); As I said, I solved it, somehow -- but as I don't like unknown unknowns, my question is: apart from kills(), is there anything else that would make the duration() of a timeline == 0, and the progress() == NaN ? That's what was happening. But the timeline itself existed, i.e. != null.
Building Game - Entire browser freezes on third firing of requestanimation frame
codeavenger posted a topic in GSAP
This may have nothing to do with GSAP as I have both a jquery library and a pathfinding ai library, but I'm not getting any errors, and the coords spit out by my ai seem fine. After the third click on the screen the entire window (chrome) has to be closed and reloaded. Any ideas? I really want to have my basic movement down so I can actually get to building my game http://jsfiddle.net/ccarterc1984/BfpF2/
Why wont second timeline animate?
codeavenger posted a topic in GSAP
http://jsfiddle.net/ccarterc1984/5t9EU/2/ First timeline seems to work great. It animates each box individually forward and backward. Upon completion of the reverse animation, I call a function which runs the second timeline. However the second timeline does not animate, it simply sets the properties instantly.
cerulean posted a topic in GSAP (Flash)
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)!
Simple Timeline sequencing question
cerulean posted a topic in GSAP (Flash)
This is another no-brainer that's puzzling me. If someone could show me the error of my ways I'd be grateful. In this code tl.to(startButton,0.25,{autoAlpha:1}, "+=1"); tl.addCallback(waitForStartButtonPush,"+=0.01"); tl.to(startButton,0.25,{autoAlpha:0}, "+=.01"); where "tl" is a timelinemax appended to the main timeline and 'startButton' is a movieclip on stage, followed by private function waitForStartButtonPush():void { _mainTimeline.pause(); startButton.addEventListener(MouseEvent.CLICK,startButtonClick,false,0,true);} the issue I was having is that the startButton was only tweening partway to autoAlpha== 1. I solved this by putting the autoAlpha tween inside waitForStartButtonPush(), before I paused the main timeline, but I was unclear why it wasn't working the first way — why is the call to mainTImeline.pause getting called partway through the tween? It may be something in the way I've ordered my timelines, but I wanted to know if there's a reason I'm missing in the way I'm timing things.
Way to change 'default' tween for TimelineMax convenience methods?
cerulean posted a topic in GSAP (Flash)
I've been making good use of TimelineMax's convenience methods: timeline.to(....), etc. As I understand it, these are syntatic sugar for timeline.add(Tweenlite.to(...)), etc Is there a way to change it so that the convenience methods would instead use TweenMax? Ran into an issue where I was trying to use 'yoyo' but wasn't working…and it's because TweenLite doesn't offer 'yoyo', I believe. I offer it as a suggestion for future releases, if it's not currently implemented.
1061: Call to a possibly undefined method from through a reference with static type com.greensock:TimelineMax.
cerulean posted a topic in GSAP (Flash)
Just downloaded the latest 'bonus' AS3 files and am getting strange TimelineMax errors, in particular it doesn't seem to grok 'to' and 'from" -- the funny thing is I haven't touched the code generating the error recently -- It just started when I grabbed the new libraries -- it's happening with TImelineMax .to() and .from() 1061: Call to a possibly undefined method from through a reference with static type com.greensock:TimelineMax. -- and stopped when I put the old libraries back
TimelineMax Convenience Methods and Tween Classes
icg_cnunez posted a topic in GSAP
Do TimelineMax convenience methods only create TweenLite Classes, or can they create TweenMax Classes? I want to create TweenMax Objects, not TweenLite Objects. If I want to do this, will I have to use TimelineMax.add(TweenMax.convenienceMethod())?
Dynamic changes to child Timelines "on the fly"
cerulean posted a topic in GSAP (Flash)
Today is the day of many Timeline questions — thanks for your help and patience. I'm interested to the extent of which multiple nested timelines are "baked in the cake", that is how much you can change not-yet-played timelines on the fly. Can you update the child timelines and tweens before the parent is played and while it is playing? Also I was experimenting with the ability to play timelines independent of their parents. Apparently it doesn't work. That is, if you have a timeline added to another timeline, you can't seem to play() the child timeline prematurely. Is this true? I then tried removing it from the parent timeline in a callback, but that seemed to make no difference. Only if I created an entirely new child timeline in the callback could I play it immediately. I assume this is all as it should be, but could someone explain why? This, for instance, failed var main:TimelineMax = new TimelineMax({paused:true}); var one:TimelineMax = new TimelineMax; var two:TimelineMax = new TimelineMax; one.to(aSquare,3,{onUpdate:function(){trace('in one')},x:"+=300"}); one.to(aSquare,4,{onUpdate:function(){trace('in one 2')},y:"+=300"}); two.to(aCircle,2,{onUpdate:function(){trace('in two')},y:"-=200"}); main.addCallback(dochange,1); main.append(one,0); main.append(two,3); main.play(); function dochange():void { trace("removing two"); trace(two.timeline); // has a parent main.remove(two); trace(two.timeline); // has no parent two.play(); // won't play nonetheless until already set place in parent. }
Why can't you nest one Timeline instance in multiple Timelines?
KVMaster posted a topic in GSAP (Flash)
From the TimelineMax FAQ I understand that Timelines can only appear in one parent Timeline at a time. I'm just curious what the reason for this is. In my current project It has the unfortunate consequence that any Timeline that uses a "shared" child Timeline will have to be cleared and remade every time it's played. Which is not a huge deal, I'm just curious more than anything. Thanks!
cerulean posted a topic in GSAP (Flash)
Is there any reason one can't TweenMax.updateTo() a TweenMax nested inside a TimelineMax? I'm sure it's me, but it's driving me crazy. I do this (I have an object being tweened from z:500 to z:0 or something like that, but not on x), thus (simplified): _obstacleTimeline.add(TweenMax.to(obstacle,OBSTACLE_SPACING-1,{z:obstacle.finalZ})); and later $tween.updateTo({x:stage.stageWidth,autoAlpha:0,ease:Quint.easeIn},false); and the object that's being tweened does what it's supposed to and then goes _back_ a way in z-space and comes forward again from the left. I'm not restarting the tween (updateTo(...,true)). Again, I'm sure it's me, but have been checking this for 1/2 hour and see no errors on my part…
Best practice(s) for modifying running Timeline(Max) (UPDATED)
cerulean posted a topic in GSAP (Flash)
UPDATE: The question below is still valid — but in the end I'm going to be playing parts of an already established timeline (as detailed in another post) so I believe that simply stopping the main timeline and playing my other one and continuing the main one is the best option, unless there's a way to insert a section of a timeline into another timeline I have a game that runs by playing one grand timeline from start to finish. The variations in game play occur by simply updating some individual tweens if the players hits a target, etc — the main timeline keeps running. I've just been informed that sometimes though something else should happen — a very complex series of things perfectly suited for another timeline. What would be the best way to do this? 1) Pause the main timeline and set up and play my subsidiary timeline? -- OR -- 2) Create my subsidiary timeline and simply insert it into the main one at the current time? "2" seems more elegant to me as I don't have to start/stop the maintimeline and also listen for when the second timeline ends, but I'm not sure how it would work. Could I just (pseudo code) mainTimeline.insert(newTimeline,mainTimeline.currentTime)?
Listening for labels in Timelines?
cerulean posted a topic in GSAP (Flash)
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.
TimelineLite / TimelineMax .add() with Stagger
icg_cnunez posted a topic in GSAP
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
Nesting timelines within timelines: the state of 'play'
cerulean posted a topic in GSAP (Flash)
I know that when you nest timelines within timelines, you need to have the child-timelines be 'playable', that is not have paused == true. I'm creating complex timeline(maxe)s within separate functions and then adding them to the main timeline. This seems to work, but I feel uneasy — I don't know how the child timelines 'know' to remain paused until they are added to the main timeline. I believe I read here on the forums that a timeline will wait until the next enter-frame to start -- but how do I really know when that is? Thus, in pseudo code, I have something like this _mainTimeline = new TimelineMax({paused:true}); createChildTimelineOne();// not paused createChildTimelineTwo();// not paused _mainTimeline.append(_childTimelineOne); _mainTimeline.append(_childTimelineTwo); /// ... and so on.../// _mainTImeline.play(); Why//how do I know this will always work?
Check for and Clear unused TLMaxs
DagShot posted a topic in GSAP (Flash)
Hi, i am curently working on a project witch should be bulletproof for 8h + of operation time. therefore i am looking for a safe method to check for and kill / clear / delete unused TimeLineMax and TweenMax. The Project ist Constantly adding and removing childs to the stage an deeply nestet movieclips and adding TLMaxs and or Tweens to it. Question: Are TLMAXs and TweenMaxs destroying itself and removing itself COMPLETELY if the MC it was Attached to, gets removed from stage OR do i have to do this manually. In case they're NOT destroying themselves: what can i do? i bet theres a nice and easy way to handle every greensock thing on stage ever put into existence, Thanks in advance, David
TimelineMax - Sounds embed in frames
Akira posted a topic in GSAP (Flash)
Hi, i'm developing a framework based on greensock, but i have a problem, there are a lot of animations with sounds embeded in frames. i want to use: tl.append(TweenMax.to(myMc, 50, {frame:myMc.totalFrames}));It works great, but the sound embeded doesn't sound Is there a property what i can use to fix it? or automatically sounds in frames are silenced? Thanks
Fade out all elements of a timeline then pause
Jan posted a topic in GSAP
Hi, i wounder how to fade all elements in a timeline. I can't introduce a new extra container - which would be easy to fad - cause of several zIndexes used for the elements. Can someone give me a hint? Jan
Page 18 of 20
“Any time I've struggled to achieve a complex animation in CSS alone, I've never regretted using @greensock 's GSAP. After all these years, and impressive competitors, it's still Best In Class.”
“This is by far the fastest and most active community I've ever seen for getting personalized answers to questions. Only with the help of GSAP and this forum was I able to accomplish my project.”
“@greensock it’s a great library that many people love, and I know you care deeply about performance :)”
“GreenSock has encouraged me to play with the code, to dream up new and exciting things to do.”
“Really quite impressed with @GreenSock JS - even the small things.”
“@greensock is just pure awesomeness. What more can be said?”
“I can definitely say ever since I started using GSAP, my work exponentially improved. It basically changed my life.”
“Reading through the GreenSock docs; been amazed like 14 times so far! How can a library be SO complete? Been using that for about 2 years now but man... This the first time I feel this way about a library.”
“I absolutely love working with GSAP. It’s been one of the most enjoyable things I’ve ever studied and the team do a fantastic job of making it first of all but also in the fantastic forums. I’ve managed to learn so much from that so I’ll always be gratefu”
Sign Up For Our Newsletter
Get the latest updates on GreenSock products, exclusive offers, and more right in your inbox.
Your information will always be kept confidential.
Thanks for signing up!
Now you'll begin receiving the latest GreenSock updates, exclusive offers, and more right in your inbox. Welcome aboard.