Theta Posted March 31, 2013 Share Posted March 31, 2013 Hello everyone, I need help here. I tried Greenshock's Tweenlite, but I found the animation appears "jumpy". I don't know what's wrong The file's attached. Here's the code of document class:package { import com.greensock.*; import com.greensock.easing.Back; import flash.display.MovieClip; /** * ... * @author */ public class Main extends MovieClip { public function Main() { TweenLite.to(box_mc, 3, { x:100, y:100, ease:Back.easeOut } ); } }}// (I used Flash CS 6 btw ) Link to comment Share on other sites More sharing options...
Theta Posted March 31, 2013 Author Share Posted March 31, 2013 Here's the link to the files: http://www.mediafire.com/?6y923oyryuam2m3... Link to comment Share on other sites More sharing options...
Carl Posted March 31, 2013 Share Posted March 31, 2013 I think what you are seeing is just related to the horrible performance of the Flash Player / debugger that is launched when you do a test movie from Flash. If you open up the swf on its own in the stand alone player or view it in a browser you will see much better performance. Flash CS6 has an option to send all test movie previews to a browser. Go to Control > Test Movie > select "in browser" All subsequent test movie attempts will now give you a browser preview and you should see much better results. Give it a shot. Let us know if you still have problems. There is nothing wrong with your code and I was able to see the swf run flawlessly. Link to comment Share on other sites More sharing options...
Theta Posted April 1, 2013 Author Share Posted April 1, 2013 Thanks for your response . Great! It works when I published it to web page. But when I published in stand alone swf or win projector, it still appears jumpy.My friend told me to give flash player time to take a breath before doing his stuff using this:public class Main extends MovieClip{public function Main(){TweenLite.delayedCall(0.2, onTween, null);}public function onTween(){var obj:Object = { x:100, y:100, ease:Back.easeIn };TweenLite.to(box_mc, 3, obj);}}It works well Link to comment Share on other sites More sharing options...
Carl Posted April 1, 2013 Share Posted April 1, 2013 Glad to hear it works for you. Yes, it appears that the projector and some versions of the standalone player take some time to wake up and get ready to run the swfs. On a more technical level they have been known to run garbage collection routines within the first second of running. So yes, putting a little delay in there should be an appropriate safety. 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