Jump to content
Search Community

Search the Community

Showing results for tags 'timelinemax'.

  • 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. 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?
  2. First, I want to be clear that I know that GS is highly optimized, and that in no way do I mean to imply there's any problem with the GS speed. I've never had one. I've been working on a large sectional project for 3 months where games are being run along with videos inside an external player. One of those games -- using rudimentary Flash 3D, etc and using a touchscreen for touch detection -- runs slower than the client wants. The issue is, of course, with the videos and the external player, and with the multitude of external videos being played. That having been said, is there anything I can do to turbo-charge GS — the game relies on many TweenMax's, TimelineMax's, etc -- to get some small performance boost? I was thinking of something along the lines of fine-tuning onUpdates, or something, perhaps make them check less often — grasping at straws here. We believe the fault is in the videos/player, again, but I thought I'd investigate all angles…
  3. 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.
  4. 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.
  5. 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: <?xml version="1.0"?> <content> <timelimit limit="45" /> <MP3Loader url="music/jetski/321go.mp3" name="js321Go" autoPlay="false" load="true" /> <MP3Loader url="music/jetski/pg3-300beachs.mp3" name="js300beaches" autoPlay="false" load="true" /> <MP3Loader url="music/jetski/pg5-texassurf.mp3" name="jsTexasSurf" autoPlay="false" load="true" /> </content> )
  6. 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
  7. 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.
  8. 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/
  9. 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.
  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. 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.
  12. 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.
  13. 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
  14. 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())?
  15. 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. }
  16. 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!
  17. 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…
  18. 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)?
  19. 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.
  20. 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
  21. 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?
  22. 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 themselfs: 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
  23. 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
  24. 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
  25. I need to animate a bunch of sprites (well, they're animals) within a rectangular (but not square) boundary. I'd like to move them around in a random, non-jittery fashion -- perhaps random bezier curves. I'm also keen to move the ones at the top back in the z-space, and those at the bottom nearer (I suppose I can simply do a loop through each time and map y coord to z coord). I found some nice Greensock code (posted at the bottom) that will move animals in a circular area, but I need to be able to move within an arbitrary rectangular area (again, of arbitrary ratio, not necessarily square). Is there any other similar code here that would work for that, or is there any easy way to modify this code to make it work (boundary checking? Sin's and cos's are not my forte tonight). Any help much appreciated! var xCenter:Number = 275; var yCenter:Number = 200; var poolRadius:Number = 200; function tweenFish():void { var angle:Number = Math.random() * Math.PI * 2; //random angle in radians var radius:Number = Math.random() * poolRadius; TweenLite.to(fish, 2, {x:Math.cos(angle) * radius + xCenter, y:Math.sin(angle) * radius + yCenter, ease:Quad.easeInOut, onComplete:tweenFish}); } tweenFish();
×
×
  • Create New...