Jump to content
GreenSock

Jack

Stuttering of animation due to CPU intensive operation

Moderator Tag

Recommended Posts

My animation (a rotating loading indicator) occasionally stalls as my app is processing some code. Is there a way to avoid this? Is there a way to make the animation run on the GPU rather than the CPU? Any ideas are welcomed!

 

thanks,

Jack

 

Below is the code that I run. The displayObject "_spCenter" is a circular loading indicator:



private function rotate():void {
  if(_tween == null || !_tween.active){
  _tween = new TweenLite(_spCenter, .6, {rotation: 355, ease: Linear.easeInOut, onComplete:rotate});
  }
}

Link to comment
Share on other sites

nope. if flash is processing an intensive amount of code the next frame will not render until that code is processed.

 

I am not aware of any work-arounds for this.

Link to comment
Share on other sites

What about Stage3D? Is that something to look into?

Link to comment
Share on other sites

I doubt Stage3D will solve your problem or that the rotation is really the source anyway, but I will point out that using TransformMatrixPlugin to do the rotation may be a bit smoother - see the interactive example at http://www.greensock.com/tweening-tips/ (first tip)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×