Jump to content
Search Community

phillyj8

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by phillyj8

  1. I have a situation where I have a TimelineMax that I've created with a sequence of TweenLites. I'd like to reverse back through it but before I do so, I need to change the first TweenLite in the array (which will be now be the last) and swap it out with something else. For example, lets say there is mc at x:0, y:0, and I do this: myTimeline.append(new TweenLite(mc, .2, {x:100, y:100})); myTimeline.append(new TweenLite(mc, .2, {scaleX:10, scaleY:10})); myTimeline.append(new TweenLite(mc, .2, {x:0, y:200})); Then, I want to reverse it after its done playing, but instead of it going back to x:0, y:0, I want it to end at x:500, y:500, and not pass through x:0, y:0 (its original starting point) at all. Is that possible? I've tried using append and prepend before I reverse it, but to no avail. Thank you.
  2. Thanks a lot. I had a feeling I was asking a bit much of Flash with that. I have converted all lines to fills and it did indeed fix the issue. I'm assuming what I'm doing is still going to be a bit processor intensive and probably not the best idea, though. Do you happen to know if eats up a lot of resources to do something like this, even though 99.99% of the shape is outside the stage? Maybe masking the shape would help? I realize this is all well outside having anything to do with TweenLite, and I appreciate any knowledge you can spare. Thanks again.
  3. I have attached the FLA. You'll see that the code I pasted in before is the entirety of the code.
  4. Hi, I'm working on a project where I need to scale vector lines (drawn in Flash or imported from Illustrator) extremely large, up to 150x their original scale. I've been trying to use Tweenlite to do this and am getting some odd results. The lines seem to "jump" when you get zoomed in very far. You can see an example here: http://manvsrobot.com/zoom-test.swf You should see the red line jumping over the blue one and then going back a few times as it zooms in. Do you have any idea why this is or how I could solve it? Here's the code I'm using: import com.greensock.*; import com.greensock.easing.*; var myTimeline:TimelineMax = new TimelineMax(); myTimeline.append(new TweenLite(line, 10, {scaleX:150, scaleY:150}));
  5. That's a great solution, works perfectly - thank you!
  6. I think my issue in trying to use TransformAroundCenter is that I don't actually want to scale around the center of the mc; I want to scale around the point at the center of the stage. (Just as Google Maps or any other map zoom would work - it zooms down on whatever is right at the center of the stage regardless of where the map is positioned.) Is there any way to do that with TransformAroundCenter? I just briefly tried placing the mc inside of a parent mc and then using TransformAroundCenter to scale the parent mc instead, but I still couldn't get it to center on the stage. About my other question, here's some pseudo-code: myTimeline.append(new TweenLite(mc, 1, {x:0, y:0})); myTimeline.append(new TweenLite(mc, 1, {transformAroundPoint:{point:new Point(mc.x + (mc.width/2), mc.y + (mc.height/2)),scaleY:2, scaleX:2}})); You can see I'm trying to use mc.x and mc.y in the second part of the sequence. However when this runs, they don't use the values that they were just moved to - they still have the previous values of wherever they were before. I'm just not sure how to get the second part of the sequence to recognize that they're now at 0,0. This may be irrelevant if I can get it working with transformAroundCenter, because then I won't have to position the point manually anyways. Thanks for the help!
  7. I just purchased Shockingly Green so I can use the TransformAroundCenter and/or TransformAroundPoint plugins to help with an application I'm trying to make, but I need some help getting started. What I'm trying to do is very simple. All I want to do is pan and zoom a movieclip on the stage. And I've managed to get it working, but I just want to make sure I'm using these plugins right, as I feel like I'm making it harder than it needs to be. Here's my code: var targetX:int = 0; var targetY:int = 0; myTimeline.append(new TweenLite(mc, 1, {x:targetX, y:targetY})); myTimeline.append(new TweenLite(mc, 1, {transformAroundPoint:{point:new Point(targetX + (mc.width/2), targetY + (mc.height/2)),scaleY:2, scaleX:2}})); You can see I'm calculating the new center of the mc based on its coordinates and dimensions. That way I can zoom straight in on whatever is at the center of the stage. Is this the best way to do this? Or should I be able to use TransformAroundCenter or some other simpler method of getting this done? I'm going to have to do this hundreds of times for this project, so I want to make sure I'm doing it in the most efficient way possible. One other question - is there any way to get the x & y coordinates that the mc is moving TO? You see in my code I'm having to use variables to store this info, because if I use mc.x & mc.y, it returns the old values, from before the mc was moved. Thanks!
×
×
  • Create New...