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. Sure, you just forgot to set overwrite to false on the second one. Please see http://blog.greensock.com/overwritemanager/ for details on overwriting modes. TweenLite.to(mc,1,{ _x:20, ease:Quart.easeOut}); TweenLite.to(mc,1,{_y:80, ease:Quart.easeIn, overwrite:false});
  2. Hi, I have a newbie problem, (and the miracle for me with greensock tweening is that I don't have a lot more of them). In order to avoid loadmovie and a tween from causing unwanted things happening, I put my loadMovie in a function that uses delayedCall - this is AS2, btw - one_mc.onRelease=function(){ TweenMax.to(_root.band_mc,0.3,{_height:0.25, yoyo:1, overwrite:1}); TweenMax.to.delayedCall(1.0, loadOne); function loadOne():Void { _root.loader_mc.loadMovie("one.swf"); } }; The tweens (there are a series of these clips on the page) work brilliantly. Unfortunately the loadMovies aren't loading any swf's. They all load via a single empty mc, if that has any bearing. If anyone can help me on this I would be very very grateful. I would make a concerted effort to search deeper rather than ask here, but I promised my girlfriend that I wouldn't work this evening, and I need to make a flying start to tomorrow as a result of not working this evening. * Thank you* all very much for your kindness and your time.
  3. Thank you for your time, and also thank you very much for getting back to me in my previous question. If its any consolation, I am learning quickly - and if it wasn't for the fact that I really like to construct my site using loadMovie then this would not be so critical for me to get right. I anticipate once I get this, then happy days and I will never be stuck at this point again; nor will anyone else in the future if this exchange becomes a swift reference point for such questions re loadMovie. I understand the logic of flash - the syntax often escapes me, but I am learning by doing. So I separated the functions (at least I hoped I had): var pause_one_loading:TweenMax = new TweenMax.to.delayedCall(10.0,load_one); function load_one():Void { _root.loader_mc.loadMovie("pages/one.swf"); } and then I call it from: one_mc.onRelease=function(){ TweenMax.to(_root.band_mc,0.3,{_height:0.25, yoyo:1, overwrite:1}); load_one.play(); } But that may well, strictly speaking, be a nested function of sorts, so next I tried to assign two clearly separate functions to the same event: one_mc.onRelease=function(){ load_one.play(); } one_mc.onRelease=function(){ _root.loader_mc.loadMovie("pages/one.swf"); } Both times I get the same error, "there is no method with the name 'play'" I know you have enough of a drain on your time to refer questions about loadMovie and tween clashes elsewhere, but perhaps this exchange can be quickly referred to in future questions regarding delaying a loadMovie call? I had no idea that delayed.Call existed, and it is a godsend. I have skimmed the documentation but my eye was geared towards tweening rather than anything else. Best regards, LF
  4. Yep, there's a much more efficient way to do that. Like: var logo:DisplayObject; for (var i:int = 1; i logo = this.getChildByName("logo" + i); TweenLite.from(logo, 2, {alpha:1, width:1, height:1, x:360, y:270, delay:Math.random()}); TweenLite.to(logo, 2, {alpha:0, width:1, height:1, x:360, y:270, delay:7 + Math.random(), overwrite:false}); }
  5. hi, i'm using as3 tweenmax and tweenlite i want to make blur and move animation. but, i need first and last values of blur effect during animation. I tried timeline and overwrite but timeline is stopping before second animation.dont understand overwrite my code is here. but values is the same all time. TweenMax.to(container.markalar, 1.5,{x:git,blurFilter:{blurX:20}, ease:Elastic.easeOut} ); TweenMax.to(container.markalar, 3,{alpha:1,blurFilter:{blurX:0}} ); I want to my blur effect values begin 0 , high 20 and ending with 0 again. how can i do this?
  6. Sorry for my english as i am Canadian french let say i use a class to keep different animation props : var slideWithBlur:WinAnimType=new WinAnimType([{ease:Strong.easeOut,startAt:{x:1000,y:'T'}},{x:-2000,ease:Regular.easeIn}],[.75],[{blurFilter:{blurX:100}}]); so i could do : manager.openWin('win1',slideWithBlur,WinType.BASIC); basically, i have 3 params 1:An array containing two object (in, out) 2:An array containing one or two number (speed) if only one number exists, it is used for in and out animation 3:An array containing one or two object (FX) if only one number exists, it is used for in and out animation Two tweens are used at the same time with overwrite 0 (one for the basic props and the second for the Fx, mainly blur) In this example, the object comes from the right (x:-1000) and aligned to top (y: 'T') (i parse the letter in my code and inject it in the tween props) in addition, the object is blurred from 100, to 0 (i use Tween.from for the blurIn), then from 0 to 100 (i use Tween.to for the blurOut) The problem is that on blurOut , my objetc will do 0 to 100 for the blur instead of 100 to 0 like it should (that is when i reuse the BlurFilter props for the in and out) But if i do [{blurFilter:{blurX:100}},{blurFilter:{blurX:100}}] as third param instead of [{blurFilter:{blurX:100}}] it work as expected Shouldnt the same work for the in (from) and out (to) Here is the get function returning from inside the class WinAnimType: public function get animFxIn():Object { return $fxAnimProps[0]; } //the array contain only one objet, used it for in and out public function get animFxOut():Object { return ($fxAnimProps[1]==null) ? $fxAnimProps[0]:$fxAnimProps[1]; } I hope it is clearer now,and many thanks again !!!
  7. Actually, I thought with overwrite set to 0, the first tween would be allowed to end before the second one started. I just gave the two together like that as an example - they 'can' happen together in a game I'm building - when an object begins flipping, it's possible to click another object... when that happens I want the first object to complete it's flip, then flip again to go back to its original position. I see the flaw now, yes. Thanks for the clarification. Funny, I've been using TweenLite for a couple years and never ran into this.
  8. Sure, but two cautions: 1) You're using transition:"easeOutElastic" but that looks like Tweener syntax. With TweenLite, it's ease:Elastic.easeOut (don't forget to import the easing equation) 2) You're creating two tweens of the same object, but the second one will overwrite the first one unless you set overwrite:false or initialize OverwriteManager once, like OverwriteManager.init(2). See http://blog.greensock.com/overwritemanager/
  9. Nope, it's definitely not a bug. I think you might be misunderstanding how a tween works and when the starting values are populated. When a to() tween actually begins playing (after any delay), it will tween the property from wherever it is at that moment to whatever you defined. So consider the following code: TweenLite.to(myObject, .5, {rotationX:"180"}); TweenLite.to(myObject, .5, {rotationX:"180", overwrite:0}); Both tweens will start at the same time. So let's say the rotation is currently 0. The first tween will start and say "okay, add 180 to whatever the current value is over the course of 0.5 seconds. Go!" And it applies the very first increment (so if you were using a linear ease, and the first render happens at 0.02 seconds, it'll set the value to 3.6). then the second tween starts and say "okay add 180 to the current value which is 3.6....) See what I mean? When the 2nd tween finishes, it'll be at 183.6. Your code was assuming the second tween would look at the first one, immediately fastforward that tween to its end, and add the relative value to that. See the logic flaw? You really shouldn't have two tweens of the same object affecting the same property at the same time anyway. Did you want to sequence them? If so, make sure you add a delay to the second tween. Or use the new TimelineLite or TimelineMax class in v11 to set up a whole sequence. http://blog.greensock.com/v11beta/
  10. I'm looping a MC TweenMax.allTo([counterMC6.numbers4], 1, {y:-600, repeat:140, delay:1.5, ease:Linear.easeNone} ); I have another button that pauses it. TweenMax.allTo([counterMC6.numbers4], 0, {paused:true, overwrite:true} ); How would I resume the repeating animation? Do I have to nest it in another Tween and pause/resume that Tween? I don't want to loose the number of times it has already repeated.
  11. Ok, so I almost have this wrapped up, but I still have an issue, I have an object that has four properties dimension radius center[0] center[1] obviously center is an array that has two values im trying to access each value individually like so ShaderUtils.tweenTo([mc],"Twirl",2.4,{ center[0]:100, center[1]:300, dimension:[233], radius:[3] }); of course center[1] and center[0] do not work, i get 'expecting colon before left bracket' syntax error; ////////////////////////////////////////////////////////////////////////////////////////////////////////// i tried this as well var vars:Object = { }; vars.overwrite = 0; vars.ease = $easeType; vars[center] = []; vars[center][0] = 100; vars[center][1] = 300; vars[dimension] = 233; vars[radius] = 3; vars.onUpdate = function() { var filter:ShaderFilter = new ShaderFilter(currentShader.shader); $target.filters = [filter]; } TweenLite.to(currentShader, $time, vars); any ideas
  12. I have three movie clips on the stage. Inside each movie clip are four objects named "hover1" -- "hover4" Inside each movie Clip is this code. for (i=1;i<=numberOfQustions;i++){ //setup hover effects eval("hover"+i).useHandCursor = false; eval("hover"+i).onRollOver = function (){TweenLite.to(this,.5*tT,{_alpha:50});}; eval("hover"+i).onRollOut = eval("hover"+i).onDragOut = function (){TweenLite.to(this,.5*tT,{_alpha:0});}; } When I mouse between the objects in the same movie clip, everything works perfectly. However, when I quickly move from one movie clip to another, onto a hover with the same name in another movie clip, the "fade out" stops. I tried adding "overwrite" to the tweens (0,1,2,3), but not gave the correct effect. Please help! I don't want to make the names in each MC unique - it defeats what I'm going for, the contents of these movie clips needs to be identical. Thanks!
  13. Does anyone know of a slideshow tutorial or source code with greensock transitions? I'm looking for a slide transition with timer and prev and next buttons. I've done it with either buttons or timer but getting both to work is starting to wear on me. Here is the code if you can see ways to help, it would be appreciated. As far as I can tell, the timer part works great by itself, but as soon as I click on a button while in mid-transition, I'll get duplicate copies of timers. Does the onComplete perameter fire even if the tween never reaches it's finish? Is there a way to deal with that? Thanks. var waitTime:Number = 1; //the timer between each transition var clipNum:Number = 0; //dont change var startX:Number = slides_mc.clip_1._x; //for slide positioning var homeX:Number = slides_mc._x; //stores original slide_mc x position var curX:Number = slides_mc._x; //stores the current slide_mc x position var timer:Number; var tween:TweenMax; var clipArray:Array = [slides_mc.clip_1, slides_mc.clip_2, slides_mc.clip_3, slides_mc.clip_4, slides_mc.clip_5, slides_mc.clip_6]; setPosition(); startTimer(); //position all slides side by side function setPosition():Void { for (var i:Number = 0; i < clipArray.length; i++) { var clip:MovieClip = clipArray; clip._x = (clip._width * i) + startX; } } //start and clear timer function startTimer():Void { timer = setInterval(function () { if (clipNum >= clipArray.length - 1) { slide1(); } else { slide2(); } clearInterval(timer); }, waitTime * 1000); } function slide1():Void { TweenMax.to(slides_mc,.7,{startAt: {blurFilter:{blurX:20}}, blurFilter:{blurX:0}, _x: homeX, //delay: waitTime, ease: Quint.easeOut, overwrite:3, onComplete: startTimer}); clipNum = 0; curX = homeX; trace("clipNum = " + clipNum); trace("curX = " + curX); } function slide2():Void { TweenMax.to(slides_mc,.7,{startAt: {blurFilter:{blurX:20}}, blurFilter:{blurX:0}, _x: curX - slides_mc.clip_1._width, //delay: waitTime, ease: Quint.easeOut, overwrite:3, onComplete: startTimer}); clipNum++; curX = curX - slides_mc.clip_1._width; trace("clipNum = " + clipNum); trace("curX = " + curX); } //nav buttons btn_next.onRelease = function() { clearInterval(timer); curX = curX - slides_mc.clip_1._width; clipNum++; trace("clipNum = " + clipNum); trace("curX = " + curX); TweenMax.to(slides_mc,.7,{startAt: {blurFilter:{blurX:20}}, blurFilter:{blurX:0}, _x: curX, ease: Quint.easeOut, ovewrite:3, onComplete: startTimer }); } btn_prev.onRelease = function() { clearInterval(timer); curX = curX + slides_mc.clip_1._width; clipNum--; trace("clipNum = " + clipNum); trace("curX = " + curX); TweenMax.to(slides_mc,.7,{startAt: {blurFilter:{blurX:20}}, blurFilter:{blurX:0}, _x: curX, ease: Quint.easeOut, ovewrite:3, onComplete: startTimer }); }
  14. Hey Jack, I am using TweenMax 10.12 (AS3). I have run into a problem where... if I tween something like so... TweenMax.to(thumb, slideTime, {transformAroundCenter:{rotation:this.layoutData[index].rotation}, x:this.layoutData[index].point.x, y:this.layoutData[index].point.y, ease:Back.easeOut, onComplete:thumbTweenComplete, onCompleteParams:[thumb] }); then later try to do something like... TweenMax.to(clickedThumb, slideTime, {transformAroundCenter:{rotation:this.layoutData[0].rotation}, bezierThrough:[{x:200, y:200}, {x:this.layoutData[0].point.x, y:this.layoutData[0].point.y}], ease:Quad.easeOut, onComplete:thumbTweenComplete, onCompleteParams:[clickedThumb] }); The x, y of the object will not tween. I tried using overwrite:1, that seemed to work, but it doesn't work in a browser?? Have you ran into any problems with do a normal x, y tween then later trying to do a bezier tween? Thanks
  15. Wow, that was weird - definitely looks like a bug in Flash. There was a play() call inside gotoAndPlay() that wouldn't resolve unless I added "this." to it, this.play() even though that should be implied! Anyway, I just posted a fix. Thanks for letting me know about the issue. As for adding a stop() action, you have several options: 1) Use TimelineMax's addCallback() to add a callback which calls stop() at a particular time on the timeline. 2) Manually add a zero-duration TweenLite with immediateRender:false and overwrite:false to the timeline with an onComplete - that's the same as using TimelineMax's addCallback() but less convenient. 3) Use TimelineMax's tweenTo() method if you want to just go from wherever the timeline is to a particular point and stop.
  16. No, I think you misunderstood. The default behavior in TweenLite (when you DON'T call OverwriteManager.init() or use TweenMax/TimelineLite/TimelineMax) is to immediately and completely kill all existing tweens of the same object when a new tween is created. So initializing OverwriteManager wouldn't help you performance-wise. TweenLite was already overwriting previous tweens immediately. And even if OverwriteManager is initialized, you can pass overwrite:true in your tween to force it to overwrite all existing tweens of the same object. Maybe try that and see if it helps things at all. Although if you're just going to play() and reverse() a single tween now, that's even better.
  17. Oups sorry my mistake, you are right I meant reverse. I will edit my post. This is also great news to hear that tweenlite now supports reverse, I always wanted that For the overwrite manager, I thought that if you didn't initialize it it would automatically overwrite any overlapping tween. Anyway good info to hear that it wasn't the case. So it would mean that I could have probably solved my problem by initialising it?. I could send you my project if you want to see the behavior but it was the problem to be sure... since I change that for a timelineLite (a Tweenlite VERY soon ) the animation runs very smoothly and as it should. Thanks
  18. Ok here are my findings so it might help others. I have a button class which have it's own listeners applied to it so as soon as I add a button it is already set up. These events included a RollOver and a RollOut. The reason my little application was running slow is this (simplified code to make it simple): private function fadeIn(e:MouseEvent):void //RollOver listener { TweenLite.to(texte_mc.titre_mc, .2, {colorTransform:{tint:0xffffff}}); } private function fadeOut(e:MouseEvent):void //RollOut listener { TweenLite.to(texte_mc.titre_mc, .2, {colorTransform:{tintAmount:0}}); } It seems that when I was moving the mouse over the buttons very fast, the fact that the tweens were "going one over the other" (which I don't understand since I didn't init the overwrite manager) was completely bugging my app... To solve the problem I just did a timelineLite so even if the tween isn't complete it will just reverse from where it is. Like this: public var timeline:TimelineLite = new TimelineLite({paused:true}); timeline.append(TweenLite.to(texte_mc.titre_mc, .2, {colorTransform:{tint:0xffffff, tintAmount:1}})); private function fadeIn(e:MouseEvent):void //RollOver listener { timeline.play(); } private function fadeOut(e:MouseEvent):void //RollOut listener { timeline.reverse(); } Thanks again
  19. I noticed several problems: 1) You desaturation the Loader immediately, but your rollOver/rollOut handlers try to saturation/desaturate the content of the loader. So you've desaturated the container which means that even if the contents of that container are fully saturated, you'll never see it because the container itself is desaturated. You should make your tweens affect either the loader or the contents consistently. 2) You've got conflicting tweens: TweenMax.to(mc, 3, {colorMatrixFilter:{saturation:0}, delay:1, overwrite:0}); TweenMax.to(mc, 3, {colorMatrixFilter:{saturation:1}, delay:0, overwrite:0}); After the delay expires (1 second), you've got two tweens that both control the same property of the same object for 2 seconds. Not good. Be careful about setting overwrite:0. Usually the AUTO mode does a very good job. In any case, I'm not sure what you were trying to accomplish with these tweens, but they definitely shouldn't be run together. Hope that helps.
  20. Well, I'm not generally a fan of that style of creating tweens because it's a bit clunky and slow. Iterating through the properties of an object and copying them to a new object is...well...slow. If you want to create some general styles that can be overridden when necessary, you could just set up some functions that accept parameters for stuff that might change, kinda like: function navOver(target:Object, duration:Number, delay:Number=0, overwrite:uint=1):TweenLite { return new TweenLite(target, duration, {alpha:0.6, scaleX:1.1, scaleY:1.1, ease:Sine.easeOut, delay:delay, overwrite:overwrite}); } function navOut(target:Object, duration:Number, delay:Number=0, overwrite:uint=1):TweenLite { return new TweenLite(target, duration, {alpha:1, scaleX:1, scaleY:1, ease:Sine.easeIn, delay:delay, overwrite:overwrite}); } Or if you want more flexibility and are willing to give up some speed, you could set up defaults like: public static const NAV_OVER:Object = {alpha:0.6, scaleX:1.1, scaleY:1.1, ease:Sine.easeOut, delay:0, overwrite:1}; function tween(target:Object, duration:Number, style:Object, vars:Object=null):TweenLite { if (vars == null) { vars = {}; } for (var p:String in style) { if (!(p in vars)) { vars[p] = style[p]; } } return new TweenLite(target, duration, vars); } Then you could simply pass in the style, like: tween(mc, 1, NAV_OVER); //uses all defaults tween(mc2, 1, NAV_OVER, {delay:1, onComplete:myFunction}); //overrides the delay and adds an onComplete Just a few ideas. Hope it helps.
  21. Hi guys. Thanks GS for the great classes! I'm just trying them out for the first time. Wouldn't you know it, I've already run into a snag. Let me try to summarize what I'm doing: A button is set to "pulse" at regular intervals. The pulse is achieved by tweeing the scaleX and scaleY properties of the object. Pretty straightforward stuff really. The only complication is that the user can also "make" the button pulse by rolling over it and rolling off it. To do the "pulse", I'm using a pair of TweenLite tweens with a delay between them that's exactly the length of time it takes the first tween to complete - one to grow it to its max size, the other to shrink it back to 100% original size. The reason I'm doing this in 2 steps rather than using Bounce is unclear, other than that I suspected that when the user needs to "take over" the pulse manually by rolling over the object, I wanted to be able to override the current Tween and just set up the new tween to match the rollover / rollout action. so we have something like: TweenLite.to(myButton, tweenLength, {scaleX:1.5, scaleY:1.5, overwrite:1}); TweenLite.to(myButton, tweenLength, {scaleX:1, scaleY:1, delay:tweenLength, overwrite:0}); This works like a charm. My button is happily pulsing. I set up a timer after this which waits for a few seconds, then starts the pulse over again, so there's a few second delay between "pulses". If I understand what's happening here, you're basically holding on to TWO tween objects that could theoretically conflict (because of overwrite:0) but because of the delay, the conflict never occurs. Dandy. Am I right so far? Now, later on in the code, we define the rollover and rollout event handlers. This is where the weirdness creeps in. So my rollover looks like this: TweenLite.to(myButton, tweenLength, {scaleX:1.5, scaleY:1.5, overwrite:1}); and my rollout looks like this: TweenLite.to(myButton, tweenLength, {scaleX:1, scaleY:1, overwrite:1}); Now the way I see this is that either of these two tweens should COMPLETELY REPLACE any and all of the vars associated with the previous tweens that were set up in the pulse. Including the delay. At least that's how I read overwrite:1 (ALL) - completely kill the previous tween on that button (delete the TweenLite object) and then create a brand new one with its own brand-new set of instance variables. Well here's the weird part: the rollover tweens have the delay in them now! If the user rolls over the buttons BEFORE the first pulse ever occurs, there's no delay whatsoever, and everything works as God intended. BUT, if the user waits for a pulse, the next time he rolls over or rolls off the button, there's a delay that's exactly the same length as the delay I set up in the second pulse tween. Now why should this be? First of all, I'm surprised that the delay variable even carries over from one TweenLite object to the next; second, I'm shocked that overwrite:1 doesn't, in fact, overwrite delay! I was able to solve the problem by explicitly specifying delay:0 whenever I don't want a delay, but it seems to me that I should not have to do this. At least, according to how I interpret the documentation. Any insights or thoughts on the matter would be helpful. Tom
  22. Yep, I see the problem. You set up 2 vars objects and then you reuse them. That's fine, but you keep changing the "delay" property of each one. So you changed it to a non-zero value, and then when you used that same vars object again and didn't alter the delay property, you probably thought it was zero, but it wasn't - you had set it to something else previously. That's why it worked fine when you made sure to specifically set it to zero. Also, you said you're not initing OverwriteManager but you used an overwrite mode of 3 on one of the tweens - that won't work unless OverwriteManager is initted. Make sense now? If something isn't working as expected, feel free ask. There's no voodoo magic going on in there that would cause strange behavior, requiring you to set overwrite values in strange places . It should prove to be rock solid. No known bugs whatsoever. And I know a lot of people that kick the snot out of this little engine and rely on it heavily with zero problems. (not to imply there are never bugs - just saying you can generally trust it to do its job very well even under tons of stress) Happy tweening!
  23. Hey thanks for the quick reply. I don't *believe* the timer is causing the conflict, because it's a long delay and I'm testing the rollovers well within that delay tolerance. Regardless, here are the relevant pieces of code for you to peruse: Setting up some constants: private static const PULSE_TIMER_DELAY:Number = 5 * 1000; private static const PULSE_REPEAT_DELAY:Number = 3 * 1000; private static const PULSE_ITEM_DELAY_SECONDS:Number = .175; // rollover and tween values - I'm putting them up-front here just to make it easier for my guys to tweak the values without digging deeply into the code private static const TWEEN_FRAMES:Number = 8; private var navTweenStates:Object = { over: { alpha: .6, scaleX: 1.1, scaleY: 1.1, ease:Sine.easeOut }, out: { alpha: 1, scaleX: 1, scaleY: 1, ease:Sine.easeIn } } private var pulseTimer:Timer; // this will hold my Timer object to add a nice juicy delay to the timer Then we initialize the view, and get a reference to the appropriate movieClip (navMC). navMC is a MovieClip that contains 3 buttons. We get references to those three buttons and they are passed to the TweenLite constructor (well, your .to static function cause I don't want to feel obliged to hold onto a reference to the TweenLite object! haha) The "pulse" code private function startPulseTimer() { pulseTimer.start(); } private function resetPulseTimer() { pulseTimer.delay = PULSE_TIMER_DELAY; // this sets up the initial delay before the first "pulse" pulseTimer.repeatCount = 1; pulseTimer.reset(); } private function stopPulseTimer() { pulseTimer.stop(); } private function doPulse(event:TimerEvent) { for (var i = 1; i < 3; ++i) { // cause there are 3 buttons that have to pulse var navItem = getNavItem(i); var tweenObj = navTweenStates["over"]; tweenObj.overwrite = 1; // just to be safe. I realize that 1 is the default since I'm not initing overwriteManager, but hey, things got weird back there... TweenLite.to(navItem, tweenTime, tweenObj); tweenObj = navTweenStates["out"]; tweenObj.delay = tweenTime; // this is the delay to get the second pulse to follow the first, since I couldn't find a "back and forth" tween class - though now I'm aware there is one: thanks! tweenObj.overwrite = 0; TweenLite.to(navItem, tweenTime, tweenObj); } pulseTimer.delay = PULSE_REPEAT_DELAY; // this is a shorter delay between subsequent "pulses" pulseTimer.repeatCount = 1; pulseTimer.reset(); // probably redundant here but I'm not taking any chances! pulseTimer.start(); } Now the reason I set up this timer will hopefully be more clear - because there's this long initial delay, then smaller delays between subsequent pulses. But the pulsing is turned off as soon as the user interacts with the buttons. Once the user has stopped interacting, the long delay starts over, and then after the first pulse, goes back to the shorter delay. Here's the mouseover stuff: override protected function navButtonOver(event:MouseEvent) { stopPulseTimer(); var tweenObj = navTweenStates.over; tweenObj.overwrite = 3; tweenObj.delay = 0; TweenLite.to(event.currentTarget, tweenTime, tweenObj); } override protected function navButtonOut(event:MouseEvent) { resetPulseTimer(); startPulseTimer(); var tweenObj = navTweenStates.out; tweenObj.overwrite = 3; tweenObj.delay = 0; // if I don't include this parameter at all, I see a delay when the user rolls the mouse out! Do note that at this point, the timer is stopped and there is no pulsing tweens going on anywhere else. TweenLite.to(event.currentTarget, tweenTime, tweenObj); } What do you think? Without resorting to TweenMax, where do you think this issue is coming from? I'd like to solve it from m y code first, before you show my some funky new-fangled way of doing things, just because I want to understand the error first. Thanks so much, T
  24. Could you post an example of the broken version? I think there must be something else going on - the delay never carries over from one tween to another, and you're right - the overwrite:true will definitely kill all existing tweens of that object. However, you mentioned a timer that you set up that triggers a new pulse every so often - I wonder if that's causing the problems? TweenLite cannot know that your Timer is going to call a function that triggers new TweenLite instances (preemptively overwriting tweens that don't exist yet). Oh, and for the pulse effect, you might want to try using combining the new "repeat", "repeatDelay", and "yoyo" properties of TweenMax v11 because you could get a similar effect with one line of code that'd replace all your timer stuff and the two other tweens. Like: TweenMax.to(mc, 1, {scaleX:1.5, scaleY:1.5, repeat:-1, repeatDelay:0.5, yoyo:true}); http://blog.greensock.com/v11beta/
  25. Of course. Why, are you running into trouble? If you turn on OverwriteManager in AUTO mode, you don't even have to add overwrite:false. OverwriteManager.init(2); TweenLite.to(square, 2, {z:1000, ease:Back.easeIn}); TweenLite.to(square, 2, {x:400, ease:Sine.easeOut});
×