Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

swiftmend

Members
  • Posts

    40
  • Joined

  • Last visited

swiftmend's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Thanks. I got it working. Turns out I wasn't setting up my layout properly, and was simply not correctly using the class. Amazing performance once I figured it out properly - love green sock!
  2. Hi, I'm working on a mobile app that shows a list of players avatars, these avatars are made up of text, external swfs and other things. It's basically a big movie clip holding these objects. Now, I'd like to be able to smoothly tween up/down this list using throw props. I have all the functionality I want done, but the performance is not very good. Am I doing something wrong? This is my code: function mouseDownHandler(event:MouseEvent):void { TweenLite.killTweensOf(container); y1 = y2 = container.y; t1 = t2 = getTimer(); container.startDrag(false, new Rectangle(bounds.x, -99999, 0, 99999999)); container.addEventListener(Event.ENTER_FRAME, enterFrameHandler); container.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); } function enterFrameHandler(event:Event):void { y2 = y1; t2 = t1; y1 = container.y; t1 = getTimer(); Mask.update(); } function mouseUpHandler(event:MouseEvent):void { container.stopDrag(); container.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); container.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); var time:Number = (getTimer() - t2) / 500; var yVelocity:Number = (container.y - y2) / time; var yOverlap:Number = Math.max(0,container.height - bounds.height); ThrowPropsPlugin.to(container, {throwProps:{ y:{velocity:yVelocity, max:70, min:70, resistance:200} }, onUpdate:Mask.update, ease:Strong.easeOut }, 10, 0.3, 1); }
  3. I'm trying to get a realistic ease for a ball, this is my current tween: myTween = TweenLite.to(this, 1, {physics2D:{velocity:velo+StepForce, angle:CurrentAngle, ease: Quart.easeOut}}); This is a top down view of a ball that you can kick around, I'd like the balls friction to basically ease to 1, but it doesn't appear you can set friction to happen over a tween, only the initial setup. I don't mind doing an onUpdate to recorrect it, but the tweens other elements would need to all remain the same. Is there a better ease for a rolling stop type ease?
  4. Hi, I'd like to have a movie clip that follows a Bezier path with its rotation oriented toward its path as per normal with the usual orientToBezier: true. However the twist is I need a child of that movie clip to have a movie clip that doesn't rotate along with it, so I need to correct its rotation every frame to make it up right. Any ideas on this one?
  5. No worries - Got everything working! Love greensock!
  6. Is there a simple way to add/remove elements from a CirclePath2D motion path to dynamically increase/decrease the movie clips on the path? I'd basically like only a quarter of the circle visible, which is populated by an array of movie clips - 3-4 would be on-screen at any time, when they go off-screen the next object is placed at the beginning, etc. I've thrown together a basic demo, which is adding the elements to the circle, which goes back/forth as I'd like - but what I need is the ability to support an array of about 30 of these movie clips, with them being added/removed as they hit the borders of that white line. Any tips? I've spent a few hours on it and have not been able to solve it. fla: http://db.tt/2VDygRQ
  7. Is this task simply not doable, or too hard? Is there a work around?
  8. Hi, I have several entry points onto a main bezier looping pathway, when they join it, they will continue to loop around (until they break off, which is other code, but what I need to get working perfectly now is the looping of the main loop). Any ideas on how to solve the "jump" when it loops? I'm talking about the time and rotation issue when it loops. I've read that UpdateTo is what I want to use, but have tried various uses of it and have not found a solution! Check out the fla (codes on the timeline): http://db.tt/VGJ44KL
  9. I found this place with some info: http://stackoverflow.com/questions/1448 ... ess-bezier suggestion is using UpdateTo(), but I can't get that to do much. Any clues? Cheers
  10. I've made a very simple demo showing my current issue. I have several entry points onto the main bezier looping pathway, when they join it, they will continue to loop around (until they break off, which is other code, but what I need to get working perfectly now is the looping of the main loop). Any ideas on how to solve the "jump" when it loops? Check out the fla (codes on the timeline): http://db.tt/pQIOpfn
  11. Excellent, that works. Only issue remaining is getting the loops rotation to line up perfectly. But I suspect thats due to my positioning - I don't think there is anyway to seamlessly tween from one bezier to another?
  12. sorry, i don't know what this means. can you provide an image or better description? I; currently using orientToBezier:true - to have my movie clips face the direction of the tween they are moving in. However when you reverse a bezier tween, it doesn't reverse the direction they face in, they continue to face the correct direction, rather then the new reverse direction. That make sense, or should I get a pic together?
  13. Thanks! I wasn't actually using a round circle, more rather a path that ended where it began, so I opted for adding the onComplete and onCompleteReversed stuff to mine and it works well for the issue of looping. Only issue is the remaining is getting the bezier itself to face in the reversed direction, is there any other functionality I'm missing that would do this?
  14. Hi, I'm trying to figure out a way of reversing a bezier tween, and have it loop. So I basically have a series of points that form a circle, I need to be able to on the fly, make the Tween reverse to go in the reversed direction, but I want it to continue looping in a circle. I am using repeat: -1 to make it loop, which works fin going forwards, but it doesn't utilise it when a reverse() is called, it just stops when it gets to zero, how can I get around this and make it loop back to the final pint when it hits the first point? Also, is there a way to change the facing of the tween, I have the Bezier to to orientToBezier: true - but it doesn't seem to care about that when reversing, which I guess is functionality (as it's literally a tween reverse, rather then a path reverse).
×