Share Posted March 4, 2014 I am trying to use the transform around centre with starling TextField instance but i keep getting this error: [Fault] exception, information=TypeError: Error #1009: Cannot access a property or method of a null object reference. I am activating the plugin before use like this in the class that i am using it: TweenPlugin.activate([TransformAroundCenterPlugin, TransformAroundPointPlugin, ShortRotationPlugin]); And then i am trying to execute this code: TweenLite.to(_textField, _animationDuration ,{transformAroundCenter:{scaleX: 1.2, scaleY: 1.2},ease:Elastic.easeOut}); Is this a known issue with starling or am i just forgetting something. EDIT: Actually i can't get the plugin to work at all, even with the displaylist Link to comment Share on other sites More sharing options...
Share Posted March 4, 2014 Hi, Sorry, TransformAroundCenterPlugin is designed to work with native AS3 DisplayObjects only. You should have no problem using it on normal objects on the display list. Please test using just the code in the docs: import com.greensock.TweenLite; import com.greensock.plugins.TweenPlugin; import com.greensock.plugins.TransformAroundCenterPlugin; TweenPlugin.activate([TransformAroundCenterPlugin]); //activation is permanent in the SWF, so this line only needs to be run once. TweenLite.to(mc, 1, {transformAroundCenter:{scale:1.5, rotation:150}}); That's all you should need to get it working. Are you getting errors? If you can't get a basic example working, feel free to zip it and upload it. We'll take a look at it. Please don't include the com/greensock folder which contains the members-only plugins. Thanks! 1 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