Jump to content
Search Community

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. I've been trying for about a week to get this fairly simple animation to run without overloading my old machine's CPU (1.8 gz, 1.5g RAM). A recent test on a machine with 2.4 gz and 4g RAM gave similar results. I know I'm doing something wrong but I sure need some help to figure out what it is. I launch the same tween with each click so a rapid clicker can launch as many as 5 tweens per second. Each tween has a duration of 1and all run well until about 5 rapid clicks, then everything starts to slow down. If I click about 20 times the animation stops for about 10 seconds, starts again, and then finishes the tweens that I launched. But, if I start clicking again then all the tweens start out dog slow and my machine stalls. So it looks as if my code is maybe using up all my RAM. The tween below uses a 2 px dot (attached 16 times) and moves each one radially so that it looks like an expanding cirlce of dots. Am I simply being too ambitious with the tweens? Also, does "TweenMax.allFrom" actually run a separate tween for each object in it's assigned array? Is it more efficient than running a separate tweenLite for each array object? var dot_Array:Array = new Array(); var dot_mc:MovieClip; var dot_Timeline:TimelineLite = new TimelineLite; function dumpClips():Void { for(var i:Number = 0; i < 16; i++){ removeMovieClip(dot_Array[i]); } remove(dot_Timeline); } function movedot():Void { for(var i:Number = 0; i < 16; i++){ dot_mc = this.attachMovie("dot", "dot", getNextHighestDepth()); dot_Array[i] = dot_mc; dot_Array[i]._alpha = 0; // _root.xcd_Array and _root.ycd_Array contain the ending positions for each dot dot_Array[i]._x = _root.xcd_Array[i]; dot_Array[i]._y = _root.ycd_Array[i]; } dot_Timeline.append(new TweenMax.allFrom(dot_Array, 1, {_x:0, _y:0, _alpha:100, ease:Linear.easeNone, overwrite:false, onComplete: dumpClips}, 0)); }
  2. I'm confused - you want to allow multiple tweens to control the same property of the same object? Maybe you're wanting to use a variable to track the destination y value and always append amounts to that variable on the new tweens. In other words, if every time I click a button, it should tween down 10 pixels, and I click 5 times really fast, you want the last tween to make it move down 50 pixels total (from where it was at the beginning). If that's the case, use a variable. Kinda like this: var destinationY:Number = mc.y; //current position. function clickHandler(e:MouseEvent):void { destinationY += 10; TweenLite.to(mc, 1, {y:destinationY, overwrite:true}); }
  3. Thanks for quick answer. I think I should have said, that I don´t want to overwrite tweens, because they all need to be done. The tween repeats everytime, when a new box appears. TweenLite.to(box, 0.5, { y:box.y + 100} ); Sometimes the next tween starts within the duration of 0.5. So I´d like to set NONE with the OverwriteManager, but having the problem that it seems not possible with overlapping properties. Ciao Martin
  4. Absolutely! You've got tons of options. Check out http://blog.greensock.com/overwritemanager/ (although the names have changed slightly in v11). You probably just want to set overwrite to true or use the AUTO mode in OverwriteManager by calling this once in your swf: OverwriteManager.init(2);
  5. 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.
  6. 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
  7. 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}); }
  8. 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 !!!
  9. 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.
  10. 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/
  11. 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.
  12. 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
  13. 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!
  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. 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
  17. 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/
  18. 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});
  19. I think I see the problem. It's not really a bug as much as a misunderstanding about how and when overwriting occurs. In ALL mode, overwriting occurs immediately when the tween is created. In all other modes (AUTO, CONCURRENT, ALL_AFTER), overwriting occurs as soon as the tween is initted (typically when it starts for the first time). In your example, the first time your timeline starts playing each of the tweens, it inits them and overwriting logic runs. Thereafter, however, it doesn't keep re-initting those tweens. It just renders them. So let's say your timeline plays. Its children are initted. Then you roll over one of those bars and it creates another (standalone) tween. While that tween is running, you start playing your timeline again. The tween that's nested in the timeline doesn't keep looking for competing tweens after it has already initted, so it lets that one run. See what I mean? You could invalidate() the timeline or tween to force it to re-init on the next render cycle. That would consequently force it to overwrite other competing tweens at that point (depending on your OverwriteManager mode). Keep in mind that invalidating a tween/timeline will get rid of all the starting values too which can actually be very handy. If, however, you want to retain the starting values, set the currentTime back to 0 before invalidating(). I know this sounds convoluted, but overwriting is actually one of the most complex aspects of a tweening engine. That's also why a lot of engines don't even have any overwriting management capabilities.
  20. It looks like it... I downloaded the latest version ov v11, but the problem remains. I recreated the problem here: http://www.deeait.com/testing/GS/test.html . Source files are attached below. When you remove the MouseOver/Out functions, everything works nicely. But as soon as there are two tweens on the same mc they conflict, and the new tweens do not seem to overwrite the old ones.
  21. Do you have the latest v11? Please make sure you do, because there was a bug for a few days that was recently squashed. http://blog.greensock.com/v11beta/. And are you saying that the new tween does NOT overwrite the old one when it should?
  22. Check different "overwrite" options and test with that option added to your call.
  23. You can either use the "delay" special property to sequence the tweens, or use an onComplete to call a function that does that. Just tween it off the stage and then use removeMovieClip(). TweenLite.to(ruta2_mc, 1, {_x:300, _y:450,_xscale:100, _yscale:100 }); TweenLite.to(ruta2_mc, 1, {_x:800, delay:1, overwrite:false, onComplete:myFunction}); function myFunction():Void { ruta2_mc.removeMovieClip(); } If ruta2_mc is at a level lower than 0, you'll probably have to swapDepths() to a higher level before you removeMovieClip().
  24. So I take it that "kill" and "overwrite" are different things? In my example the object only has a single property being tweened and overwritten. So why would AUTO behave differently than CONCURRENT? They are both overwriting individual properties of the tween - a single x position tween. In AUTO, why would a tween continue to "live" when it is the tween that was just overwritten? In your opinion, what should I use in this particular case?
  25. CONCURRENT mode (3) will kill ALL tweens of the same object (regardless of whether or not properties overlap) that are running at the time the tween begins. AUTO will only overwrite individual properties of those tweens (and allow the tweens themselves to live).
×
×
  • Create New...