Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

robertnyc's Achievements


Newbie (1/14)



  1. I'm trying to figure out how to something like this: http://www.hakim.se/experiments/html5/wave/03/ It's math I know (which math?) -- but bezierThrough seemed so tantalizingly close -- tried with curveTo from the flash lib, and it works great for one curve, but all the rest......no
  2. Has anyone used TweenMax to generate semi-realistic waves? It seems like something interesting could be done with the bezier plugins (although perhaps AS3's curveTo would suffice), and the physics plugin. If no, any pointers to good code that shows how it might be done?
  3. Thanks. It's probably that I'm fading the images in -- and sometimes moving them -- that's bogging it down.
  4. I just did a project using TweenMax and some large imported images. The image manipulation was slow -- which is due to the inherent nature of the beast, nothing to to with TweenMax, I know. What are your tips for tweening large images? • Alpha: if you're fading in and out Stage-sized images, what works best: tweening the alpha of the image, tweening the alpha of a mask, or...? • Movement: how to move things swiftly? Is it best to work with bitmaps, movieclips, does it make one iota of difference? I've seen some interesting code (that Jack pointed to in another post) dealing with quick ways to move a large image across screen (using CopyPixels) -- but this seems something different here. I'd be curious to hear of any creative solutions -- even extending to using Alchemy or whatever :->
  5. Yes, of course. Thanks -- it was simply that the tween in the plugin explorer was set long enough (4 seconds) that I stopped exploring before it ran out -- assumed it ran forever, but if I moved mouse long enough, sure enough tween stopped.
  6. Thanks -- I'm somewhat sleep deprived today as well so perhaps I was unclear. I think it must be something like what you did in the internals of CirclePath2DPlugin -- simply that as you move around a circle the angle will jump from 360 to 0, for instance, so if you're tweening from 180 to 70 you're going to have a tween from 180 to 360 then from 0 to 70; timeline sounds like a good plan.
  7. If you use dynamic properties plugin in the tween, is the tween always 'running'. That is, in the example you have on the site, the tween will always follow the mouse. Thus the tween is now a function that's always "listening'? Does this mean that any tweened objects are then never garbage-collected?
  8. What's the best way to do a discontinuous tween? This arises in a project I'm working on where I need to rotate an object around a circle -- and also rotate the object to always face the center. Due to the geometry there was a case where the range was discontinuous and I got a situation like this _nuRotation = _angleInDegrees < 0 || (_angleInDegrees >0 && _angleInDegrees <=90)? _angleInDegrees +90 : _angleInDegrees -270; Don't worry about what it means -- the point is that there was a break, as there must be, in the circular degrees. Now in this incarnation I'm moving the mouse and rotating everything based on that. What I'd like to do is programmatically move things -- and use TweenMax to tween the angle and then set everything based on that. (Note I can't simply use rotation, as it's an object rotating around something, etc etc). How would I do this? I could use onUpdate during the tween to check and "jump" the tweening values, but if I'm one tween update behind or ahead, I could have the object flying to the opposite side of the circle, then back. Is there anyway in TweenMax to specify something like tween from a to b then from c to d in one tween. I suppose you could set up two tweens, but looking for simplicity?
  9. Thanks. I misread the following post -- I thought it was you posting the first post, not the other fellow, that's where I got the idea from -- http://forums.greensock.com/viewtopic.php?f=1&t=3129
  10. I'm doing a rush project that involves importing some large AI files into flash and moving things around -- As you might suspect, these AI files lead to a gazillion little pieces in the movie clips. Therefore, when I'm zoomin' and twistin' and scalin' the MC the performance is not as fast as I'd like. The obvious answer would be to make a bitmap of the entire movieclip. But not wanting to rewrite chunks o' code I thought I'd ask: is there any simpler way to speed things up when working with complex MCs? I thought I'd hit it with cacheAsBitmap but I read that a) TweenMax/Lite turns this off when tweening, and this can actually slow things down. Any answers much appreciated
  11. How do you make Timelines dependent on dynamic variables? That is, let's say you set up a timeline such as _myTimeline.insert(new TweenMax(myObj,1,{x:someIntegerVariable})); and let's say, for instance, that you set someIntegerVariable based on a mouseDown -- so that you want myObj to tween to where the mouse click is (this is all pseudo code/bogus example, but just for illustration). For me, the timeline doesn't "know"to update when the underlying variables change. That is, it will always tweeen to whatever someIntegerVariable was when the timeline was set up originally. _myTimeline.invalidate() doesn't seem to help -- Or am I doing something wrong?
  12. I was poring through the LiquidStage source and came upon the configuration import com.greensock.layout.~~; I've never seen an import statement written that way (usually import com.greensock.layout.*) and googling didn't reveal anything. Why is it written that way? Robert
  13. Is there any circumstance in which this _arrowTimeline = new TimelineMax({onComplete:enableArrow,paused:true}); _arrowTimeline.insert(new TweenMax(purplearrow,TWEENTIME,{y:purplearrow.origY,ease:EASE})); _arrowTimeline.append(new TweenMax(purplearrow,TWEENTIME,{alpha:ARROW_PULSE_MAX,ease:EASE,yoyo:true,repeat:-1})); will fail to call the onComplete function? It fails every time. If I change it to call onComplete in one of the tweens it works. Why? I'm sure I'm missing something simple _arrowTimeline = new TimelineMax({paused:true}); _arrowTimeline.insert(new TweenMax(purplearrow,TWEENTIME,{y:purplearrow.origY,ease:EASE,onComplete:enableArrow})); _arrowTimeline.append(new TweenMax(purplearrow,TWEENTIME,{alpha:ARROW_PULSE_MAX,ease:EASE,yoyo:true,repeat:-1}));
  14. OK, that seems to work, but it seems I would then have to set up all tweens twice (not a big deal, but when there are a lot of tweens....) Does TweenMax store a copy of the ease function, or simply a reference? I thought that the following might be the simplest solution (in pseduo code) var _ease:Function = Quad.easeOut; myTweenMax = new TweenMax(something,someTime,{someparams,ease:_ease}); myTimeline = new TimelineMax(); myTimeline.insert(myTweenMax); function changedirection():void { if timeline is playing forward { _ease = Quad.easeIn; timeline.reverse(); } else { _ease = Quad.easeOut; timeline.play(); } } but that doesn't seem to work
  15. If you have multiple tweens with eases in a timeline, is there an easy way to keep the same ease on reverse? That is, if you have the ease on the original tweens as easeOut, when you reverse() the timeline they become easeIn (as far as I can see), which makes sense. But is there an easy way to make them remain easeOut? I see no overall ease on the timeline itself, although I suppose you could tween the currentProgress of the timeline and then adjust that ease. But that ruins the elegance of the simple timeline play()/reverse() (really nifty stuff!). One could also change the ease on the tweens, but again, that seems kludgy. Am I missing an easier method?