Jump to content

Search the Community

Showing results for 'overwrite'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Personal Website



Company Website



  1. 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
  2. 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});
  3. Is it possible to do this? For example: TweenLite.to(square, 2, {z: 1000, ease: Back.easeIn, overwrite: false}); TweenLite.to(square, 2, {x: 400, ease: Sine.easeOut, overwrite: false}); If it's not possible, do you have any work arounds to suggest?
  4. 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.
  5. 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.
  6. 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?
  7. Check different "overwrite" options and test with that option added to your call.
  8. Firstly, hello everybody! I recently switched to the v11 beta and i´m very happy with the new timeline feature. Thanks Jack! Currently i´m working on a project, where i use the following code: b3Timeline = new TimelineMax({paused:true}); b3Timeline.insertMultiple([ TweenMax.to(mainHolder.sImgHolder, 0.4, {x:-540}), TweenMax.to(mainHolder.barsMask, 0.4, {x:0, width:stage.stageWidth}), TweenMax.to(mainHolder.bar1, 0.4, {x:stage.stageWidth + 30, overwrite:3}), TweenMax.to(mainHolder.bar2, 0.4, {x:stage.stageWidth + 30, overwrite:3}), TweenMax.to(mainHolder.bar3, 0.4, {x:stage.stageWidth + 30, overwrite:3}), TweenMax.to(mainHolder.bar4, 0.4, {x:stage.stageWidth + 30, overwrite:3}), ], "TweenAlign.START"); b3Timeline.appendMultiple(TweenMax.allTo([mainHolder.bar1, mainHolder.bar2, mainHolder.bar3, mainHolder.bar4,], 0.3, {alpha:1}, 0.1), "TweenAlign.SEQUENCE" ); The timeline plays when the user clicks one of the bars, and is reverted on click on a close button. This far everything works nicely, but when i add mouse over & -out listeners to the bars, to call a function like TweenMax.to(mainHolder.bar1, 0.7, {x:540, ease:Exponential.easeOut}); (& back) the tweens seem to conflict: As long as the MouseOver/out Tweens are not finished, the tweening bars wil not start the x property tweens from the timeline . As you see, i tried to set the overwrite mode to 3, so this tweens would kill any existing tweens of the object, but it doesn´t seem to work... Any help would be greatly appreciated! thx, d PS: i attached the swf and main .as of the project. The problem occurs when you repeatedly click and close the 3rd bar from the top
  9. 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().
  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 I have three movie clips with rollovers and I want to make the movie clips that I am not putting the mouse over darken. The movie clip rolled over would stay its normal exposure while the others would darken. When the mouse is not over any clip they all return to the normal exposure. I feel like this below should work but I cant get it to act right (sometimes they don't darken and sometimes they do) maybe I am not using the Overwrite manager correctly. I also am sure there is a better structure to accomplish this simple task. Any ideas would be awesome. thanks square1.hitter.onRollOver = function() { TweenMax.to(square2.container,1,{colorTransform:{exposure:.5}}); TweenMax.to(square3.container,1,{colorTransform:{exposure:.5}}); }; square2.hitter.onRollOver = function() { TweenMax.to(square1.container,1,{colorTransform:{exposure:.5}}); TweenMax.to(square3.container,1,{colorTransform:{exposure:.5}}); }; square3.hitter.onRollOver = function() { TweenMax.to(square1.container,1,{colorTransform:{exposure:.5}}); TweenMax.to(square2.container,1,{colorTransform:{exposure:.5}}); }; square1.hitter.onRollOut = function() { TweenMax.to(square2.container,1,{colorTransform:{exposure:1}}); TweenMax.to(square3.container,1,{colorTransform:{exposure:1}}); }; square2.hitter.onRollOut = function() { TweenMax.to(square1.container,1,{colorTransform:{exposure:1}}); TweenMax.to(square3.container,1,{colorTransform:{exposure:1}}); }; square3.hitter.onRollOut = function() { TweenMax.to(square1.container,1,{colorTransform:{exposure:1}}); TweenMax.to(square2.container,1,{colorTransform:{exposure:1}}); };
  12. 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?
  13. 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).
  14. So what is my option then? Do I use "overwrite = 3" since that works? And please explain WHY this works. I don't see any difference between "overwrite = 3" and using AUTO in my particular example. It would be sweet to have something like: TweenMax.removeTweens(_holder.content_mc,{x}); ...
  15. Hi, thanks for the help. Yes, I read some on overwriting, and tried overwrite:0 and overwrite:2, but the results appear to be the same. I think this is the problem. A user can click the start button several times per second and the tweens aren't able to keep up with that pace on the same object/same property. I think I need to create an array of objects, each of which can be tweened separately (hopefully with the same series of tweens).
  16. TweenMax V11 If I call the "moveContent" function while the object (_holder.content_mc) is still tweening (x property) the onComplete function is called twice. The TweenMax documentation states: 2 (AUTO): (used by default if OverwriteManager.init() has been called) Searches for and overwrites only individual overlapping properties in tweens that are active when the tween begins. Why doesn't this work? I am tweening the x property of _holder.content_mc ... therefore the tweening of the x property is "overlapping" and should be overwritten. If I substitute "overwrite:3" for "overwrite:2" it works perfectly. OverwriteManager.init() private function moveContent(position:Number):void { var currentx:Number = _holder.content_mc.x; var speed:Number = Math.abs(position - currentx)/500; TweenMax.to(_holder.content_mc,speed,{x:position,overwrite:2,ease:Quad.easeInOut,onComplete:moveTagDown}); }
  17. Have you read up on your options for overwriting modes? http://blog.greensock.com/overwritemanager/. Why are you setting overwrite to 0? Doing so allows the tweens to conflict with each other (multiple tweens trying to control the same property of the same object). You might want to try the AUTO mode. I don't have time to read through your code right now to troubleshoot, but let me know if the overwriting mode solves the problem.
  18. Hi all, I'm new to AS3 but I've managed to get a small tween study working anyway. The code below is a simplified version of what I'm trying to do. The start button launches a series of 4 tweens each time it's clicked and there's no limit on the number of clicks. The tweens handle 3 different "circle" movieclips, each with a different size and color. The "flasher" tween in the code below allows the "circleRed_mc" (which has a duration of only .1) to show with each click, however in the more complex code that I'm trying to fix the "circleRed_mc" doesn't show if the button is clicked rapidly, even though the other 3 display. Do I need to add more copies of the circle objects to avoid the interference between the tweens, or do I need additional tweening functions, or both? A hopefully easier question is why does the last tween ("fadeCircle") not fade out to alpha:0? Here's the code: Frame 1: import gs.TweenLite; import gs.easing.*; import flash.display.MovieClip; var xcoord:Number = 200; var ycoord:Number = 400; var circleSmall_mc:circleSmall = new circleSmall(); addChild(circleSmall_mc); circleSmall_mc.y = ycoord; circleSmall_mc.alpha = 0; var circleRed_mc:circleRed = new circleRed(); addChild(circleRed_mc); circleRed_mc.y = ycoord; circleRed_mc.scaleX = 0; circleRed_mc.scaleY = 0; circleRed_mc.alpha = 100; var circleLarge_mc:circleLarge = new circleLarge(); addChild(circleLarge_mc); circleLarge_mc.y = ycoord; circleLarge_mc.scaleX = 0; circleLarge_mc.scaleY = 0; stop(); function startMovie(event:MouseEvent):void { this.play(); } playButton.addEventListener(MouseEvent.CLICK, startMovie); Frame 2: function leader(large_mc:MovieClip,small_mc:MovieClip,red_mc:MovieClip,xcd1:Number):void { small_mc.x = 575; small_mc.y = 700; small_mc.alpha = 100; TweenLite.to(small_mc, .5, {x:xcd1, y:ycoord, ease:Strong.easeOut, overwrite:0, onComplete: flasher, onCompleteParams: [large_mc,small_mc,red_mc,xcd1]}); } function flasher(large_mc:MovieClip,small_mc:MovieClip,red_mc:MovieClip,xcd2:Number):void { small_mc.alpha = 0; red_mc.x = xcd2; TweenLite.to(red_mc, .1, {scaleX:50, scaleY:50, alpha:0, ease:Strong.easeOut, overwrite:0, onComplete: showCircle, onCompleteParams: [large_mc,small_mc,red_mc,xcd2]}); } function showCircle(large_mc:MovieClip,small_mc:MovieClip,red_mc:MovieClip,xcd3:Number):void { red_mc.scaleX = 0; red_mc.scaleY = 0; red_mc.alpha = 100; large_mc.x = xcd3; large_mc.scaleX = 0; large_mc.scaleY = 0; large_mc.alpha = 100; TweenLite.to(large_mc, 1, {scaleX:1, scaleY:1, ease:Strong.easeOut, overwrite:0, onComplete: fadeCircle, onCompleteParams: [large_mc,small_mc,red_mc,xcd3]}); } function fadeCircle(large_mc:MovieClip,small_mc:MovieClip,red_mc:MovieClip,xcd4:Number):void { xcoord = setx(xcd4); TweenLite.to(large_mc, 1, {alpha:0, ease:Cubic.easeInOut, overwrite:0}); } function setx(xcd:Number):Number{ if (xcd < 800){ xcd += 200; } else { xcd = 200; } return xcd; } leader(circleLarge_mc,circleSmall_mc,circleRed_mc,xcoord);
  19. Hi, I'm working with the TimelineMax, and besides tweens, I'd like to add audio (Sounds class) on the timeline. But when I pause or stop the timeline, the sounds continue playing. I was wondering if TimeLineMax has any features that help me putting the sound on the timeline and manages the pause and gotoTime handling for me. Maybe something with a sub-timeline? var _soundChannel : SoundChannel; var _instance:Sound; // A class instance with a dynamically instantiated Sound. var props:Object = { delay: 0, overwrite: OverwriteManager.AUTO, onStart: function() { _soundChannel = _instance.play(); }, onComplete: function() { _soundChannel.stop(); } }; timeLine.insert(new TweenLite(instance, duration, props), startTime); TIA Ronaldo
  20. A few things off the top of my head after glancing at the code: 1) You set the overwrite mode to 0 (NONE) which means conflicting tweens will be allowed to run. I saw some conflicting tweens like bbook's x property was getting tweened by 2 different tweens at the same time meaning they'll fight with each other. I generally recommend against disabling overwrite management for this reason. Why not use the AUTO mode? 2) You're using a nested numerodos() function. Nested functions are usually problematic because they get deleted as soon as the parent function finishes running. I've seen one case in all my years where a nested function was useful, but in every other case I've seen them just cause problems and confusion. I'd avoid them. 3) In thecloser(), you create a local timer variable. I bet that's getting garbage collected because it's a local variable. Why not use TweenLite.delayedCall()? 4) You used 5 lines to activate your plugins. You can combine those all into one line like this: TweenPlugin.activate([setSizePlugin, AutoAlphaPlugin, BlurFilterPlugin, ColorTransformPlugin, TintPlugin, RemoveTintPlugin]); 5) I noticed you're doing a lot of sequencing. You might want to check out the new TimelineLite and TimelineMax classes in v11 (http://blog.greensock.com/v11beta/). They can make sequencing very intuitive and then you can manage the group/sequence as a whole very easily. Hope that helps.
  21. I know I am still learning and probably always will be but for some reason I am completely stumped with this issue I am having using Tweenmax. Any help would be completely appreciated. Basically I am trying to assign a couple of functions to a button. The first function works okay (It moves the first image off the stage, and bring the second image on to the stage, while the button , and another moves to a different coordinate) It's the second function where I ran into a wall. It's suppose to move the second image off the stage, and bring the first image to it's original coordinate. But it's not. The second image goes no where. Here is a link to the page with the animation. http://www.erickjurado.com/docs/pages/demopage.html I am guessing it's an overwrite issue, or maybe some factor I am over completely overlooking. But either way I can't seem to figure out what I am doing wrong, and slowly going insane trying to figure it out. I am using TweenMax Again any insight, help, assistance, perspective, or direction would be totally appreciated!!! Here is the code if that helps. And again much thanks for any help!!!! import fl.transitions.*; import fl.transitions.easing.*; import flash.events.MouseEvent; import gs.*; import gs.easing.*; import gs.TweenMax; import gs.plugins.*; TweenPlugin.activate([setSizePlugin]); TweenPlugin.activate([AutoAlphaPlugin]); TweenPlugin.activate([blurFilterPlugin]); TweenPlugin.activate([ColorTransformPlugin, TintPlugin]); TweenPlugin.activate([RemoveTintPlugin, TintPlugin]); stop(); var soundReq:URLRequest = new URLRequest("slapish.mp3"); var sound:Sound = new Sound(); var soundControl:SoundChannel = new SoundChannel(); var resumeTime:Number = 0; sound.load(soundReq); OverwriteManager.init(0); sound.addEventListener(MouseEvent.CLICK, thecloser); ////////////////////////////////////////VARIABLES//////////////////////////////VARIABLES//////////////////////////////VARIABLES var bf:BlurFilter = new BlurFilter(); bf.blurX = 100; bf.blurY = 100; var backgroundmover:backgrounder = new backgrounder(); addChild(backgroundmover); backgroundmover.width = 675; backgroundmover.height = 510; backgroundmover.x = 280; backgroundmover.y = 192; backgroundmover.filters = [bf]; backgroundmover.alpha = 0; TweenLite.to(backgroundmover, .75,{alpha:1,ease:Cubic.easeOut, overwrite:false}); TweenMax.to(backgroundmover, .10, {blurFilter:{blurX:100, blurY:0}}); var closermakerc:closer = new closer(); addChild(closermakerc); closermakerc.x = 43; closermakerc.y = - 125; closermakerc.width = 35.8; closermakerc.height = 35.8; closermakerc.alpha = 0; TweenMax.to(closermakerc,1, {y:345,rotation:1080, alpha:1, ease:Back.easeOut}); closermakerc.addEventListener(MouseEvent.CLICK, thecloser); var nexter:nextbutton = new nextbutton(); addChild(nexter); nexter.x = 43; nexter.y = - 125; nexter.width = 50.8; nexter.height = 50.8; nexter.alpha = 0; nexter.buttonMode = true; TweenMax.to(nexter,1, {y:300,rotation:1080, alpha:1, ease:Back.easeOut}); nexter.addEventListener(MouseEvent.CLICK, numerouno); /////////////FIRST IMAGE///////////////////// var bbook:birdbook = new birdbook(); addChild(bbook); bbook.x = 102; bbook.y = 374.1; bbook.width = 30; bbook.height = 200; bbook.rotation = 1080 bbook.alpha =1; bbook.filters = [bf]; TweenMax.to(bbook, 0, {dropShadowFilter:{color:0x000000, alpha:1, blurX:10, blurY:10, strength:.5, angle:50, distance:3}}); TweenLite.to(bbook, .25,{x:100, y:60,alpha:1, ease:Back.easeOut, overwrite:false}); TweenLite.to(bbook, .25,{x:450, width: 400,ease:Cubic.easeOut, overwrite:false,delay:.25}); TweenLite.to(bbook, .25,{width: 30,ease:Cubic.easeOut, overwrite:false,delay:.5}); TweenLite.to(bbook, .25,{rotation:0,y: 270,ease:Cubic.easeOut, overwrite:false,delay:1}); TweenLite.to(bbook, .25,{width:400,x: 50,ease:Cubic.easeOut, overwrite:false,delay:1.25}); TweenLite.to(bbook, .25,{width:40,height:40, y:250, ease:Cubic.easeOut, overwrite:false,delay:1.5}); TweenLite.to(bbook, .25,{rotation:1080, x:100,y:335,ease:Cubic.easeOut, overwrite:false,delay:1.75}); TweenLite.to(bbook, .25,{width:382, height:324, x:285, y:200, ease:Elastic.easeOut, overwrite:false,delay:2}); TweenMax.to(bbook, 1, {dropShadowFilter:{color:0x000000, alpha:0, blurX:10, blurY:10, strength:1, angle:50, distance:3},delay:2.25}); TweenMax.to(bbook, 1, {blurFilter:{blurX:0, blurY:0}, delay:2.5}); ////////////SECOND IMAGE////////////// var elspread:spread = new spread(); addChild(elspread); elspread.x = -300; elspread.y = -25; elspread.width = 30; elspread.height = 30; ////////////////////FUNCTIONS///////////////////////////////FUNCTIONS///////////////////////////////FUNCTIONS///////////////////////////////FUNCTIONS function numerouno (event:MouseEvent):void { TweenLite.to(nexter,1, {y:368.9, x:316.9,rotation:1080, alpha:1, ease:Back.easeOut}); TweenLite.to(closermakerc,1, {y:369.9, x:258.9, rotation:1080, alpha:1, ease:Back.easeOut}); TweenMax.to(bbook, 1, {blurFilter:{blurX:10, blurY:10}}); TweenMax.to (bbook, 1,{height:10,width: 100, y:100, x:350,ease:Cubic.easeIn}); TweenMax.to (bbook, 1,{rotation:90,ease:Cubic.easeIn, delay:.25}); TweenMax.to (bbook, 1,{x:800, ease:Cubic.easeIn, delay:.55}); TweenMax.to(elspread, .25,{x:275, y:171, width: 520, height:321,alpha:1, ease:Cubic.easeOut, delay:1}); function numerodos (event:MouseEvent):void { TweenLite.to(nexter,1, {y:368.9, x:316.9,rotation:1080, alpha:1, ease:Back.easeOut}); TweenLite.to(closermakerc,1, {y:369.9, x:258.9, rotation:1080, alpha:1, ease:Back.easeOut}); TweenMax.to (elspread,1,{x:800, ease:Cubic.easeIn}); TweenMax.to(bbook, .25,{alpha:1, x:100, ease:Cubic.easeOut, delay:1}); } } function thecloser(event:MouseEvent):void { TweenLite.to(closermakerc, 1 ,{ y: -60, rotation:1080, ease:Back.easeIn}); TweenLite.to(backgroundmover, 1, {width:1, height:400,delay:.75 }); TweenLite.to(backgroundmover, 1, {rotation:90, x:-300,delay:1.25 }); var timer:Timer = new Timer(4500, 1); timer.start(); timer.addEventListener(TimerEvent.TIMER, felakiller); } function felakiller(e:TimerEvent):void { this.parent.parent.removeChild(this.parent); }
  22. Your code is just creating a bunch of x/y tweens for the same object (table) that all start immediately, so they overwrite each other. It sounds like you want a sequence. In that case, you'd want to either use the "delay" special property so that they occur one-after-the-other, or use a TimelineLite, like: var timeline:TimelineLite = new TimelineLite(); for (var m:uint = 0; m var XX=board.getChildAt(player.field).x; //new x var YY=board.getChildAt(player.field).y; //new y timeline.append( TweenMax.to(table, 1, {x:(x-XX)+stageW*.5, y:(y-YY)+stageH*.5}) ); player.field++; } This relies on using v11 which you can get at http://blog.greensock.com/v11beta/
  23. Hi, I just started using TweenMax today. I have a question about tweening multiple objects, not sure if I'm going about this the best way. Objects A, B, C are on the stage in order and scaled accordingly (100%, 60% and 40%) eg. 1st place =A at 100%, 2nd place= B at 60%, 3rd place =C at 40% When you click B. The order need to change in a tween to this --> B, C, A. When you click C. The order need to change in a tween to this --> C, A, B. You can click A, B, or C at any time and change the order/focus. Here's my code: 3 if statements that check to see where the object is positioned (in 1st plae, 2nd or 3rd.) // ActionScript Document if(productC._x > 250){ trace ("hello"); //TweenMax.to(productA, 1, {_x:140, _y:75, _xscale:60, _yscale:60}); //to 2 TweenMax.to(productB, 1, {_x:-13, _y:40, _xscale:100, _yscale:100}); //to 1 TweenMax.to(productA, 1, { _alpha:0}); //to invisible TweenMax.to(productA, 1, {_x:268, _y:90, _xscale:40, _yscale:40, _alpha:100}); //to 3 TweenMax.to(productB, 1, { _alpha:0}); //to invisible\ TweenMax.to(productC, 1, {_x:-13, _y:40, _xscale:100, _yscale:100}); //to 1 //TweenMax.to(productB, 1, {_x:-116, _y:154, _xscale:40, _yscale:40, _alpha:0 ,delay:2, overwrite:1}); //to down and out } //TweenMax.to(productB, 1, { _alpha:0}); //to invisible //TweenMax.to(productC, 1, {_x:-13, _y:40, _xscale:100, _yscale:100}); //to 1 if(productC._x = 140){ trace ("yo_140"); TweenMax.to(productC, 1, {_x:-13, _y:40, _xscale:100, _yscale:100}); //to 1 TweenMax.to(productB, 1, { _alpha:0}); //to invisible productB._x = 350; productB._y = 90; productB._xscale = 40; productB._yscale = 40; productB._alpha=100; TweenMax.to(productA, 1, {_x:140, _y:75, _xscale:60, _yscale:60, _alpha:100}); //to 2 TweenMax.to(productB, 1, {_x:268, _y:90, _xscale:40, _yscale:40, _alpha:100, timeScale : 0.5 }); //to 3 } if(productC._x < 0){ trace ("yo_0"); TweenMax.to(productC, 1, { _alpha:0}); //to invisible TweenMax.to(productA, 1, {_x:-13, _y:40, _xscale:100, _yscale:100}); //to 1 TweenMax.to(productB, 1, {_x:140, _y:75, _xscale:40, _yscale:40, _alpha:100}); //to 2 TweenMax.to(productC, 1, {_x:268, _y:90, _xscale:40, _yscale:40, _alpha:100}); //to 3 } Any help/direction would be greatly appreciated.
  24. Hi j_rock Check this .fla If you don't understand something, just ask. // When you use getNextHighestDepth(), you have to refer it to an object where the next highest depth will be evaluate // like this.getNextHighestDepth() or home.getNextHighestDepth() // getNextHighestDepth() alone will not work i think // When you do // var transformManager_obj = new TransformManager({forceSelectionToFront:false, allowDelete:true}); // var transformManager_obj = new TransformManager({targetObjects:[t], bounds:{xMin:0, xMax:900, yMin:0, yMax:900}, forceSelectionToFront:true, eventHandler:onAnyEvent}); // the next var applied to "transformManager_obj" will overwrite all previous property you set in the first instantiation // Declar your vars at one in a function like // var transformManager_obj = new TransformManager({forceSelectionToFront:false, allowDelete:true}); // transformManager_obj = new TransformManager({targetObjects:[t], bounds:{xMin:0, xMax:900, yMin:0, yMax:900}, forceSelectionToFront:true, eventHandler:onAnyEvent}); Hope it help you
  25. I just tried your test and it worked perfectly for me. Could you post an FLA that demonstrates the problem? There's really no code inside TweenLite that I can think of that could possibly cause behavior like that. It would just tween the _alpha value from 0 to 100. Do you maybe have some other conflicting tween where you set overwrite:false that's also trying to tween the _alpha of the same TextField at the same time? That could explain the behavior.