Jump to content
Search Community

to tween a textfield horizontally without flicker

mistersuits test
Moderator Tag

Recommended Posts

Attempting to do a simple, looping marquee text that scrolls horizontally across the stage, but it has a very jarring flickering effect. This is an as-project in Flashbuilder 4, framerate set to 24 fps. Memory usage is low, no leaks. The textfields are dynamically created with actionscript. The fonts are embedded. I'm using roundprops to keep everything on whole pixels. I've tried using both normal and advanced anti-aliasing. I've even gone so far as to attempt to implement a bitmapdata copypixels way of doing things to no avail. Is this a common issue, am I missing something simple?

 

The tween goes something like:

 

TweenMax.to(myTextField, 10, {x:0, roundProps:["x"], repeat:-1, onComplete:resetAndDoThisTweenAgain});

Link to comment
Share on other sites

I'm guessing roundProps would make it appear worse as it is not taking advantage of Flash's sub-pixel rendering.

 

when small text isn't moving it is good to have it on whole pixels to keep it sharp. when it's moving it will cause it to appear jerky.

 

From http://www.greensock.com/tweening-tips/

 

If your animation looks a little jerky, it may be caused by cacheAsBitmap being set to true on your animating object(s). Whenever cacheAsBitmap is true, it only allows the object to render on whole pixel values which can make it look slightly jerky at slow speeds. Important: whenever a DisplayObject has a filter applied to it (blur, glow, drop shadow, etc.), it forces cacheAsBitmap to true and cannot be reset to false unless the filter is removed. That’s a Flash limitation and has nothing to do with the tweening engine.

 

its very difficult to get slow tweens (10 seconds) to look good with low framerates in Flash.

Link to comment
Share on other sites

I've tried reducing the duration to 1 second. Shortening the length of the string to just a few words instead of many. Setting the easing to Linear.easeNone. Cutting the distance of the tween from the width of the stage to just a hundred pixels. Also tried AntiAliasType.NORMAL and AntiAliasType.ADVANCED. I've tried cranking the framerate up to 30, 60 and down to 12. There is a blink or flicker on the textfield it seems on every pulse.

 

I know this isn't a greensock engine thing, I just happen to love using it for every tween so that's why I'm asking here for help/insight.

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.
×
×
  • Create New...