Jump to content
Search Community

Popinjay

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by Popinjay

  1. When an object is deleted are associated tweens killed without deleting them explicitly? E.g. If I have a movieclip that is being tweened and I remove references to it and take it off the display list but don't kill the tween. My question is actually a bit more general than just for GS tweens. I am concerned about events too. Such as if I have an enter-frame event for a MC and then remove the MC. Is the enter frame event still taking up some process time or does it disappear with the next garbage collection? Pop
  2. Popinjay

    killing tweens

    I seem to be having difficulty killing tween with timeline max. myTimeline.fromTo(glb[1], gtime, {per:.0},{per:(1+totalDelays), ease:Cubic.easeIn, onUpdate:updateTween, onUpdateParams:[glb[1], fade], onComplete:finishedFade}); myTimeline.killTweensOf(glb[1]); The kill function returns a "possibly unidentified method" error, even though setting up the tween works. Obviously I don't actually want to kill the tween as soon as I make it. This was just to show it wasn't working--I wanted to kill it someplace else in the program---but it doesn't even work immediately after creating the tween. Sorry if this is a newb question. Pop
  3. That fixed it. Thanks. I could have been working on that forever if I didn't know it was only in a recent update. Esp since I thought I was up to date. Pop
  4. I hate to keep asking questions but now i can't figure out why these two tweens do not start at the same time. Instead they go one after the other. I thought the ",0" made them start simultaneously with one another. I'm sure I am making another simple mistake. myTimeline.fromTo(glb[1], gtime, {per:.0},{per:1, onUpdate:updateTween, onUpdateParams:[glb[1], fade], onComplete:finishedFade}); myTimeline.fromTo(glb[2], gtime, {per:0},{per:1, delay:tdel , onUpdate:updateTween, onUpdateParams:[glb[2], fadeB], onComplete:finishedFade},0); myTimeline.play(); Pop
  5. YES! That was the problem. The value was not changing. Thanks for the quick and accurate help. Pop
  6. TweenMax.fromTo(gg, 3, {per:.1},{per:1, onUpdate:og.setFadeByPer, onUpdateParams:[gg.per], onComplete:finishedFade}); To change value of variable per from object gg from .1 to 1? Earlier in the class I have: public class myOnionSkinFade extends Sprite { var backgroundData:BitmapData = new BitmapData(1,1); var tileData:BitmapData = new BitmapData(1,1); var gc:myGraphicsClass = new myGraphicsClass ; var backdrop:Bitmap = new Bitmap ; var myTimeline:TimelineMax = new TimelineMax({paused:true, onComplete:timelineComplete}); var og:Object = new Object; var gg:Object = new Object; public function myOnionSkinFade(tOb:DisplayObjectContainer, tile:DisplayObjectContainer, perBurn:Number = 5) { gg.per = .1; ... the rest omitted for space reasons
  7. It was the second one. Thank you so much. I really did search a lo of pages before I posted asking. Just couldn't find it. I found one almost as useful, but it showed the curve, and not the actual animation. Thanks again, Pop
  8. I seem to recall finding a page that would show tweens with different easing settings. I keep searching but can't seem to find it again. Does anybody know the link? Pop
  9. Update: While just starting a frame later didn't work, using linear noease in conjunction with moving up a fame did work. I don't know why simply having the same number of frames didn't fix it---but thanks for the help. I didn't know easing was applied by default. I just thought I would say thanks. I know lots of times people just disappear without ever saying if their problems is solved or not. Pop
  10. Thanks for the detailed responses. I did try using one frame less before posting. That is why I thought nesting might be an issue. When I did that I kept getting another weird problem (part of the animation repeats for no apparent reason I can see). When I first started writing this program I didn't know about GS. I am now swapping tweenMax for the animations so that I can easily adjust animation speed on the fly, but since I didn't plan it that way from the beginning I'm running into problems when trying to change code I wrote more than a year ago. Anyway, I will try some of the solutions here. Maybe changing the easng will work. Pop
  11. I have two tweens: TweenMax.fromTo(gameBoard.piecesOGrid[sx][sy].amoeba.body, 1 * animSpeedFactor, {frame: 436}, {frame: 477, onComplete: move_animation_completedB, onCompleteParams: [gameBoard.piecesOGrid[sx][sy]]}); TweenMax.fromTo(gameBoard.piecesOGrid[sx][sy].amoeba, 1 * animSpeedFactor, {frame: 517}, {frame: 559}); The problem is, even though both are set to run the same amount of time one of them completes slightly before the other causing a "blinking" effect. As you might notice the animations are not exactly the same number of frames. Also the clips are nested in each other---one clip is the body and the other the eyes, if that makes any difference. Is there a way to make sure that they synchronize exactly? I was trying the timeLineMax but when I put the tweens on to that they run consecutively, not together (which is obviously how timeline is meant to work, but that doesn't help me here). Been trying to solve this for a couple of days---although figuring out the source of the problem took a large portion of this time. Any help appreciated. Popinjay
  12. nevermind, I just tweened an object I assigned a variable then tweened that with the onUpdate event (to call a routine to change the threshold with the variable on the object). Dunno if there is a better way or not.
  13. How would one go about tweening a threshold: Such as in the below statement if I wanted the ".8" to tween between say 0 and 1? bData.threshold(bData2,new Rectangle(0,0,bData2.width,bData2.height),new Point(0,0),">=", .8*0xFFFFFF, 0xFFFFFF, 0xffffff, true); Any help appreciated. Popin
  14. Hello everybody, I am completely new to using TweenMax. I had been working on a program for quite some time. As it is nearly completion I decided to switch over because, even though my game doesn't use that many tweens, problems were garbage collections and other difficulties were just complicating matters. At any rate, I was wondering if it is possible to set up a tween to look for two events instead of just one. This line doesn't seem to work for me: TweenMax.to(gameBoard.hSpinFrameX, .5, {shortRotation:{rotationZ:0}, shortRotation:{rotationX:0},shortRotation:{rotationY:0}, onComplete:finishOverhead, onUpdate:gameBoard.updateBoard, onUpdateParams:true}) Sorry if this is too newb a question. Poppin
×
×
  • Create New...