Share Posted September 30, 2011 Greetings from Beautiful Boise! I have a Sprite in which are several other Sprites as Children. The Parent Sprite is quite large: about 3500 Pixels square, and I have scaled it down (.2) to fit into a relatively small area on my Stage. My goal is to, via a ComboBox Selection, enlarge the Parent Sprite to a scaleX = scaleY = 1 (apologies, I'm not using the GreenSock ScalePlugIn on this) while simultaneously moving the Parent Sprite so that the Child is "zoomed in to." In other words, I have a large aerial photograph of a golf course that is scaled down, and I wish to scale it up and zoom into a hole simultaneously. I am scaling it via the TransformAroundPointPlugin (it's center point)... Using two TweenMax tweens is not working: The scaling works well but the tween to the Hole Point (x, y) uses the intial value of the Point prior to the Scale Up and I can't figure out how to get around that. I've looked at the OverwriteManager but that doesn't seem to be a solution in this case...or perhaps I'm missing something. Any suggestions on how to produce such a functionality? Thanks! Link to comment Share on other sites More sharing options...
Share Posted October 1, 2011 you can do this in 1 tween. i have an mc with width:260 height:200 TweenLite.to(mc, 3, {transformAroundPoint:{point:new Point(130, 100), pointIsLocal:true, scaleX:.5, scaleY:.5, x:100}}); the above tween creates a new point at 130, 100 (the center of mc) and scales down around that point AND also moves that new "registration point" to an x of 100. if you are tweening around the center, you could just use TweenLite.to(mc, 3, {transformAroundCenter:{scale:0.5, x:100}}); does that work for you? Link to comment Share on other sites More sharing options...
Author Share Posted October 2, 2011 Thank you very, very much Carl. I had tried the pointIsLocal: true parameter but had some other issues that were compounded by my being dumber than dirt. I've got 'er working now. Happy! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now