Share Posted March 2, 2012 Hi all, I am trying to use the setSize plugin in as2, but I cant make it work, this is the code I am using: import com.greensock.*; import com.greensock.easing.*; import com.greensock.plugins.*; TweenPlugin.activate([setSizePlugin]); box_mc.onRelease = expandBox; function expandBox(){ TweenLite.to(box_mc, 1, {setSize:{height:500}}); } This plugin works perfect for me in AS3, but I can´t find the way to make it work in AS2, please let me know if you see the cause of the failure. Thanks. Link to comment Share on other sites More sharing options...
Share Posted March 2, 2012 Does your target actually have a "setSize()" method? That's the whole point of the plugin - it is for calling that method and feeding the appropriate values in. Typically you'd just do this: TweenLite.to(box_mc, 1, {height:500}); Unless you're tweening a component or something that specifically needs to run custom logic in a setSize() method of its own. Have you tried a regular height tween? Link to comment Share on other sites More sharing options...
Author Share Posted March 3, 2012 Great!, honestly I just was trying each one of the plugins, and I used a simple movieclip in order to test that setSize plugin. It works in AS3, but I was wondering a lot of time why did not work in AS2 untill I decided to ask in the forum. I tested using a textArea component and works sweet. Thanks for your support. 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