Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Search the Community

Showing results for 'overwrite'.

  • 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. When you set overwrite to 0 (or false), you're telling it NOT to look for any overlapping tweens to kill - it will allow multiple tweens of the same object to exist which can lead to exactly the problem you're describing. Imagine you start tweening mc.x to 100 over the course of 1 second, but then you immediately start another tween of mc.x to 0 over the course of 0.5 seconds. Both tweens would fight for the first 0.5 seconds (with the 2nd one winning) and then when the 2nd one finishes, the first one is still going so it would suddenly jump to halfway done with the first tween to 100. The moral of the story: be very careful when setting overwrite to 0. You're taking full responsibility of managing your tweens in that case. It's usually much better to either use the AUTO mode (2) or the ALL_IMMEDIATE mode (1). If you don't have any other tweens affecting other properties of the object, I'd recommend using overwrite:1 because it's faster than AUTO. It's perfect for button rollover/outs. But AUTO is extremely convenient. Why did you set overwrite:0 in the first place? Is there a reason you didn't just leave it in the default AUTO mode?
  2. blase

    overwriting

    so, i have done this: import gs.OverwriteManager; OverwriteManager.init(); and i have one object and 2 possible tweens affecting it, one moving it in one direction, other reversing it. the code doesnt really mater, the important thing is that its affecting the same object. function showTextInfo():void { TweenLite.to(activeSong_mc, _switchTextInfoTime, { y: _infoDownY, onComplete: startTextInfoTimer, overwrite: 0 }); } function hideTextInfo():void { TweenLite.to(activeSong_mc, _switchTextInfoTime, { y: _infoUpY, onComplete: afterCloseInfoHandler, overwrite: 0 }); } i have some nasty bug in my code and i dont know if this is normal or what... does having OverwriteManager to NONE means that each tween will finish before going to the next one? the problem is that sometimes (i am still having hard time to figure out when exactly), when i am constantly calling these same tweens, the tween like skippes quickly to the next one (or sometimes even looks like it was never there...), although it should be lasting the predefined time....
  3. Tough to say for sure what's going on with your file, but did you realize that the following code just creates 100 duplicate tweens that overwrite each other? var i:int = 0; for ( i=0; i TweenMax.to(b, 2, {x:319, y:275}); TweenMax.to(b, 1, {x:442, y:406}); } That's a big waste of resources. If you're still running into trouble, please post a simple Flex project archive or FLA file that demonstrates the issue.
  4. TweenLiteVars and TweenMaxVars (inherited) contain a Boolean typecasting error that causes all instances of TweenLiteVars and TweenMaxVars to use a default value of "false" for the "overwrite" property, although the documentation indicates that this should default to an int value of 2/AUTO when the OverwriteManager is in use. This bug exists in the latest build, 11/25/2009 The workaround is to use a simple Object instead of TweenLiteVars or TweenMaxVars
  5. Hello. Trying to call a function when overwrite occurs, is it possible? Thanks.
  6. I'm trying to make a Bounce.easeOut less bouncy. I've changed the easing parameters per the Adobe white page, but TweenLite's not responding: TweenLite.to(mc, 1.5, {_xscale:100, _yscale:100, ease:Bounce.easeOut, easeParams:[ .01, .01, .01, .01], overwrite:0}); I have this thing set to a minimum and nothing changes. I've tried a variety of variables amounts and nothing goes. ?
  7. Hmm. If I remove all of the immediateRender and overwrite params, the only label I see is "GO". With the immediateRender params reapplied to the zero-duration tweens, all I get is "READY" With the overwrite params reapplied, I'm back to where I was at the start: "READY" fades and scales properly, and it always properly updates the text to "SET" and "GO", but the fade and scale tweens for those labels only work sporadically...
  8. Why are you setting immediateRender:true on any of the tweens (or false for that matter)? And why are you setting overwrite:0? You shouldn't need to do either of those.
  9. I'm trying to set up a timeline that displays a countdown: "READY", "SET", "GO", where each word shrinks and fades in. I think I've got the code right, but it only seems to work some of the time, other times the label text will update, but it doesn't shrink or fade...I think it might have to do with the tweens or callbacks interfering with each other if the machine is too slow but I'm not sure... Can you tell me if this code looks right? If so, what can I do to fix it? var tl:TimelineLite = new TimelineLite(); tl.append(new TweenLite(m_notice, 0, {alpha:0, scaleX:2,scaleY:2, onComplete:setNotice, onCompleteParams:['READY'], immediateRender:true, overwrite:0})); tl.append(new TweenLite(m_notice, 1, {alpha:1, scaleX:1, scaleY:1,overwrite:0})); tl.append(new TweenLite(m_notice, 0, {alpha:0, scaleX:2, scaleY:2, onComplete:setNotice, onCompleteParams:['SET'], immediateRender:false,overwrite:0})); tl.append(new TweenLite(m_notice, 1, {alpha:1, scaleX:1, scaleY:1,overwrite:0})); tl.append(new TweenLite(m_notice, 0, {alpha:0, scaleX:2, scaleY:2, onComplete:setNotice, onCompleteParams:['GO'], immediateRender:false,overwrite:0})); tl.append(new TweenLite(m_notice, 1, {alpha:1, scaleX:1, scaleY:1,overwrite:0})); tl.append(new TweenLite(m_notice, 0.5, {autoAlpha: 0, immediateRender:false,overwrite:0})); m_timeline.insert(tl, 1);
  10. Hi Guys, I'm breaking my head because I can't figure this one out... How can I reuse an array of tweens multiple times without overwriting it? In the bellow example the "animate2" always overwrites the "animate1" . I've tried the ovewrite manager but no luck. var myTimeline:TimelineLite = new TimelineLite(); myTimeline.addLabel("animate1", 0); myTimeline.addLabel("move", 2); myTimeline.addLabel("animate2", 4); var animate:Array = new Array(new TweenLite(mcBall,1,{x:10}),new TweenLite(mcBall,1,{x:0,delay:1,overwrite:0})); myTimeline.insertMultiple(animate,"animate1"); myTimeline.insert(new TweenLite(mcRect,1,{x:100}),"move"); myTimeline.insertMultiple(animate,"animate2");
  11. One other option: You could just do one linear tween for the whole amount, pause it, and then use other tweens to control its currentTime property, like: var myTween:TweenLite = new TweenLite(mc, 10, {y:1000, paused:true, ease:Linear.easeNone}); TweenLite.to(myTween, 1, {currentTime:1, ease:Quad.easeIn}); TweenLite.to(myTween, 8, {delay:1, currentTime:9, ease:Linear.easeNone, overwrite:false}); TweenLite.to(myTween, 1, {delay:9, currentTime:10, ease:Quad.easeOut, overwrite:false}); You'll get the smoothest effect, though, by just using a CustomEase because you can make it animate however you want - see http://blog.greensock.com/customease/
  12. First off, great set of classes you have. I am trying to make a sequence of tweens using timeline, but I can't seem to get the onComplete function to fire. I basically want a tween that repeats infinitely, but at the end of that tween' sequence, (before the repeat) I want it to initiate another tween on another object. At first I tried to append to timeline1, but that wasn't working, so I went with onComplete. The first tween works fine, but the call to the onComplete function fails. (Maybe the fact that it repeats is messing it up?) var timeline1:TimelineMax = new TimelineMax({repeat:-1, repeatDelay:30, delay:3}); timeline1.append( new TweenMax(myText2, 2, {x:131, alpha:1, ease:Back.easeOut, repeat:-1, yoyo:true, onComplete:finTween, onCompleteParams:[360, myR], repeatDelay:10}) ); function finTween(param1:Number, param2:MovieClip):void { TweenLite.to(param2, 1, {rotation:param1, overwrite:false});; }
  13. Using TweenMax Version 11. I am having an issue where tweening the rotationX value of a movie clip is overwriting a simultaneous shortRotation:{rotationY:value} tween on the same movie clip. The loop function is running on enterframe. When I call the handleRotation function it fails ... meaning that the shortRotation doesn't rotate _currentitem as it appears to be overwritten by the loop. It doesn't make sense b/c two different properties (non-overlapping) are being tweened ... rotationX and rotationY. It is my understanding that TweenMax default overwrite mode is AUTO[2] Only overwrites individual overlapping tweening properties in other tweens of the same target. private function handleRotation():void { TweenMax.to(_currentitem, 1, {alpha:alph,shortRotation:{rotationY:-_roty},ease:Expo.easeOut}) } private function loop(e:Event):void { var disty:Number = (mouseY - stage.stageHeight*0.5)/100; TweenMax.to(_currentitem, 1, { rotationX:-disty, ease:Expo.easeOut }); }
  14. This is the part I'm not understanding... why setting mouseEnabled to false calls the 'out' event. If anything it seems the 'over' is the one that might be called since the mouse is currently over 'one.' That being the case the overwrite makes sense of course. I'm just not sure what the solution is just yet. By the way I wasn't calling into question your coding of TweenMax. I expected the shortcoming was on my end. Thanks for your time.
  15. I think you may be misunderstanding the order of the calls. Let's say, for example, that you click on the mc "one". It calls clickHandler() which in turn creates a colorMatrixFilter brightness tween to a value of 2. Since inside that method you ALSO immediately set mouseEnabled to false, it then calls the out() event which you have creating ANOTHER colorMatrixFilter brightness tween to a value of 1. So you have TWO tweens of the same property of the same object occurring at the same time. TweenMax is smart enough to have the 2nd one (the one that was created last) overwrite the first one (otherwise you'd have to conflicting tweens that are fighting to control the same property of the same object). See the issue now?
  16. Yeah i am sorta having a problem with the same thing... not sure if I have it setup correctly tl.insert(TweenMax.to(myText,.4,{glowFilter:{color:0x0000FF, alpha:1,strength:9, blurX:100, blurY:50}}),0); tl.insert(TweenMax.to(myText,.12,{glowFilter:{color:0xFFFFFF, alpha:1,strength:2, blurX:1.5, blurY:1.5,overwrite:false}}),0); the second one kills the first one
  17. Sorry, it doesn't throw errors, I mispoke. What happens is it doesn't execute the colorMatrixFilter tweens in the clickHandler function. Definitely feels like an overwrite issue. Happy to send over the fla if that helps. I stripped the file down to just the five mcs (buttons).
  18. Jack, loving your new platform. Spent the past weekend kicking the tires. Question, in using the following code I'm discovering that the brightness tweens in the 'over' and 'out' functions seem to be overwriting the tweens in the clickHandler function. What's the story here? Not sure what to do about this. Any help is greatly appreciated. import com.greensock.*; import com.greensock.easing.*; var clipArray:Array = [one, two, three, four, five]; for (var i:int = 0; i < clipArray.length; i++) { clipArray[i].buttonMode = true; clipArray[i].addEventListener(MouseEvent.CLICK, clickHandler); clipArray[i].addEventListener(MouseEvent.ROLL_OVER, over); clipArray[i].addEventListener(MouseEvent.ROLL_OUT, out); } function clickHandler(event:MouseEvent):void { for (var i:int = 0; i < clipArray.length; i++) { if (event.currentTarget == clipArray[i]) { clipArray[i].mouseEnabled = false; clipArray[i].buttonMode = false; TweenMax.to(clipArray[i], 1, {colorMatrixFilter:{brightness:2}}); } else { clipArray[i].mouseEnabled = true; clipArray[i].buttonMode = true; clipArray[i].alpha = 1; TweenMax.to(clipArray[i], 1, {colorMatrixFilter:{brightness:1}}); } } } function over(event:MouseEvent):void { TweenMax.to(event.currentTarget, .3, {colorMatrixFilter:{brightness:1.3}}); } function out(event:MouseEvent):void { TweenMax.to(event.currentTarget, .3, {colorMatrixFilter:{brightness:1}}); }
  19. Several choices: 1) Use delay: TweenLite.to(mc, 0.1, {alpha:0.7}); TweenLite.to(mc, 0.2, {alpha:0, delay:0.1, overwrite:false}); 2) Use an onComplete: TweenLite.to(mc, 0.1, {alpha:0.7, onComplete:myFunction}); function myFunction():void { TweenLite.to(mc, 0.2, {alpha:0}); } 3) Use TweenMax's repeat and yoyo: Tweenmax.to(mc, 0.1, {alpha:0.7, repeat:1, yoyo:true});
  20. Hey, I would like to be able to kill the tweens of an object based on what the tween is doing, preferably by a "label" or something. So if I have one object, as Square, and I'm tweening it using two separate TimelineLites, one tweening the position, the other tweening the scale (scale is tweened on rollover, position is tweened on click), such as: var timeline:TimelineLite = new TimelineLite(); timeline.append(TweenLite.to(square, 1, {x:1000})); timeline.append(TweenLite.to(square, 1, {y:1000})); timeline= new TimelineLite(); timeline.append(TweenLite.to(square, 1, {scaleX:2, scaleY:2})); ...and I want to use TweenMax.killTweensOf(square) on every rollover/click, how do I make it so it only kills the click tweens on click, and rollover tweens on rollover? Is this built in, or do I have to manually manage it? This is a basic example so there's probably other ways to do it, but I have some pretty complex tweens, and maybe 5 different timelines for an object, and I only want to kill one of the timelines on overwrite, how do I do that? Basically, I would just like to prevent onComplete being called if the tween is interrupted... Thanks! Lance
  21. greensock, I just realized I did a horrible job explaining my problem. I actually have the animation working fine in a sequence. What I want to accomplish is: While the first tween is animating the scale from 100% to 75%, when that scale reaches about 80%, I want to do the rotationY, but do not overwrite the scale tween or stop the scale tween. Continue with both scale and the rotationY together. It is analogous to inserting a manual keyframe about halfway through the scaling tween (if doing tweening on the timeline the old fashion way), and rotating the movieClip. The rest of the scaling will continue, but the rotaionY rotation will also affect the clip, both tweens at the same time. The bottom line is that I don't want to do the scale, wait for the entire scale to complete, then do the rotation. I want to add the rotation about halfway through the scale, and have both the rotation and the rest of scale continue.
  22. how can i cancel an existing delayed tween when i create another tween that tweens the same object´s propoerty? for example, i have: private function showPopUp():void { var inpopup:TweenLite = new TweenLite(popup, 0.25, {alpha: 1, ease: Linear.easeIn, onComplete:function() { var outpopup:TweenLite = new TweenLite(popup, 0.25, {alpha: 0, delay: 3.5, ease: Linear.easeIn}); } }); } that function is called in different situations, to show a popup with some text. i´ll try to say it simple : let´s say the popup mc pops in and before it pops out, i tell him to pop in again, let´s say, after 3 seconds. then the popup mc pops out within 0.5 seconds, instead of 3.5. shouldn´t it overwrite "itself" ? i get confused. its "overwrite" property defaults to true, right? i´ve tried already in different manners, for example, by only creating a new tween instead of declaring it into a variable. obs: it works well in my computer but not in the server !!! help!
  23. Did you put a trace() in changePosition() to see if it is getting called AFTER func1()? If so, the tween in changePosition() would overwrite the one with an onStart.
  24. publicfunction changePosition() { newYValue = blah; ... TweenLite.to(content, EASE, { y:newYValue, ease:Regular.easeOut}); } publicfunction mouseUpHandler(evt:MouseEvent) { func1(); } publicfunction func1():void { newYValue = blah; ... trace("func1 started"); TweenLite.to(content, EASE, { y:newYValue, ease:Regular.easeOut, onStart:hi }); trace("func2 ending"); } public function hi():void { trace("onStart worked successfully"); } Essentially this is what happens: changePosition is called whenever an object is being dragged. So new tweens are overwriting each other whenever the mouse moves (this should be fine and works how I want it). Once the user lets go of the drag, mouseUpHandler is called, which calls func1 which does a bunch of calculations and calls a new tween on content (so it should overwrite any old tween from changePosition()). I never see the trace "onStart worked successfully". The two traces in func1() are both called, and it obviously is calling the TweenLite call between the two traces... If I move the ", onStart:hi" part of the Tween up to the tween in changePosition(), hi() gets called everytime the mouse moves, as it should. Any ideas of what I'm doing incorrectly? hi() NEVER gets called (not 30 seconds later)...
  25. Hi, I'm using TweenLite for a bit of time and I'm now playing with the latest features play(), pause(), reverse(). I looked around the forum for a solution but I founded nothing clearly solved my problem. Some code: var mainContainer:MovieClip = new MovieClip; ... mainContainer.addChild(...); ... var mainMovement = new TweenLite(mainContainer, _time, { x:stage.stageWidth-mainContainer.width, ease:None.easeNone, paused:true } ); private function onRollover(e:MouseEvent):void { mainMovement.resume(); } private function onRollout(e:MouseEvent):void { mainMovement.pause(); var arrive:Number = 100; TweenLite.to(mainContainer, _duration, { x: -arrive } ); } After a cycle of rollover/rollout the "mainMovement" resume the target where it left it and not from where the following TweenLite move it. Is there nothing like: TweenLite.to(mainContainer, _duration, { x: -arrive, onComplete: function() { mainMovement.UPDATE_X = mainContainer.x } } ); ? First I tried with TweenMax.setDestination() that partially work but "kill", or better "reset", "mainMovement"; further reverse() not working. Then I tried with overwrite property but it just control the way the two different tween work together leaves them as they are.
×