Share Posted July 27, 2021 Hi, excuse me for my lack of knowledge. I'm playing around with greensock/animate for the first time.... I am trying to scale an objects width from the left ('left_mc' across the width of the stage by 50%, I have the same happening the far right side ('right_mc')), almost like closing curtains, both objects are at very far edges of the stage. I've been tinkering with 'Scale' using TweenMax, but I cant fgure out how to pin an object and scale in one direction. Also, I guess I'll have to establish the stage dimensions first so I can define the percentage. Can someone please help point me in the right direction? or any tips on animations relative to the stage with scaling. many thanks. lister Link to comment Share on other sites More sharing options...
Share Posted July 27, 2021 Hey @lister110 I think you're looking for transformOrigin! You use it to define where you want the origin of a transform to be. For curtains, the left curtain would have transformOrigin: 'left' and the right curtain would have transformOrigin: 'right' You can't easily define scaling by a percentage of the container or stage - and I don't really know how animate works, but you could use xPercent for a percentage of the curtain. Also - We recommend using GSAP3 rather than TweenMax - we updated a lot since then! (Unless this is an Animate specific constraint) 1 Link to comment Share on other sites More sharing options...
Author Share Posted July 27, 2021 ahh thanks, ill have a look.. 1 Link to comment Share on other sites More sharing options...
Share Posted July 27, 2021 Shout if you need any nudges in the right direction ☺️ 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