Skip to main content
Inspiring
February 15, 2017
Answered

Timeline tweening and as3 tweening. Animations run jerkily

  • February 15, 2017
  • 2 replies
  • 1183 views

Problem

Animation jerky when published from Animate. CC, on a magic bar MacBook Pro 15" with 5k LG monitor attached.

This problem shows on two identical set-ups.

Description

When publishing from Animate (publish set to Flash Player or to AIR)

Two symbols tweening on the timeline run jerkily.

The frame rate drops  from 60 to 40 fps whilst the TweenMax animations run.

One greensock Tweenmax tween on a small symbol runs jerkily. But three of the same tween together are very jerky.

The frame rate fluctuates constantly between 60 and 32 fps whilst the TweenMax animations run.

Steps to reproduce:

stage size 1920 x 1080, fps 60.

A. Tweening in timeline

Create a circle symbol with gradient fill. 250 pixels x 250 pixels

Classic Tween one copy of the symbol from left stage to centre. pause it for 60 frames and play it backwards again

Add another copy on the right and move that one to the centre and back. Have the whole run timeline over 180 frames.

B. Tweening in AS3

With a small linked symbol 'Body' (gradient fill). Create a TweenMax tween on the x axis over two seconds, and set it to yoyo and repeat.

Add four of these to the stage at various y locations.

//needs greensock TweenMax

public function makeAThing(yloc:int):void{

  var c = new Body()

  c.gotoAndStop(1)

  addChild(c)

  c.x=100

  c.y=yloc

  TweenMax.to(c, 2, {x:800, repeat:-1,  yoyo:true, repeatDelay:1})

  }

Configuration and Equipment

MacOS Sierra 10.12.3

Adobe Animate 2017.1 release, build 16.1.0.86

Macbook Pro 15" 2.7Gz, 16Gb RAM, Radeon Pro 460, 4096 Mb

Monitor LG Ultrafine 27" 5k. Or Monitor LG Ultrafine 21" 4k.

Notes

Frame rate is more consistent when no external monitor used. But AS3 Tweens still jerky.

    This topic has been closed for replies.
    Correct answer simon_lucas

    OK. I found out that setting Render to Direct when publishing fixes this.

    Apologies to Colin, for not believing that render settings had any effect on anything other than Stage3D projects.

    2 replies

    simon_lucasAuthorCorrect answer
    Inspiring
    April 19, 2017

    OK. I found out that setting Render to Direct when publishing fixes this.

    Apologies to Colin, for not believing that render settings had any effect on anything other than Stage3D projects.

    Colin Holgate
    Inspiring
    April 19, 2017

    Thanks for reporting back. In addition to being needed for Stage3D, Direct rendermode also includes fast blitting of regular display list content. I used Direct in a lot of apps I've made, where there is no Stage3D content, but there is a lot of animation that would crash the app when using GPU rendermode. Direct is a lot better than CPU for that sort of content.

    Colin Holgate
    Inspiring
    February 15, 2017

    How does it perform on a device? What rendermode are you using?

    Inspiring
    February 15, 2017

    >How does it perform on a device? What rendermode are you using?

    The runtime works fine on the target platform which is a Windows desktop machine.

    When publishing and testing in Flash/Animate,  render modes do not have any effect on how fast Flash renders content. You can only access GPU rendering when using Stage3D (eg. Starling) or StageVideo. I am working with standard Flash content in the standard Flash Desktop Player, and the publish is set to Hardware Acceleration : None.

    Colin Holgate
    Inspiring
    February 15, 2017

    Some of what you say isn't quite right. Stage3D requires Direct rendermode, and won't work in GPU rendermode. StageVideo can work in either GPU or Direct rendemode.

    In any case, Flash doing an AIR emulation may not give the best performance. A fairer test would be to try a test as regular Flash Player, then I would expect the performance to be as good as the final device build.

    I see you say that you get the problem with Flash Player too. Would be interesting to do a debug test movie, see if that behaves any differently.

    It does seem odd that TweenMax doesn't keep up with real time. Are you letting Greensock know about the problem too?