Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


CacheAsBitmap making textfield blurry in iOS

Participant ,
Sep 24, 2013 Sep 24, 2013

Copy link to clipboard

Copied

Hi

I'm using Greensock's blitmask code for scrolling, but am finding that large textfields eg Privacy Policy screen etc, make for jerky movement.

I've been experimenting converting the textfield to a bitmap, then adding it to my scroll. The jerkiness is reduced, but the text quality is average - blurry almost, even with smoothing turned on.

Anyone got any tips for this type of thing?

Cheers

TOPICS
ActionScript

Views

1.1K

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 24, 2013 Sep 24, 2013

Copy link to clipboard

Copied

When you draw it to a bitmapdata you're rasterizing the text to (sub)pixels so it will definitely get soft. Scaling will affect this also of course.

If you really want device friendly speed you should consider going to the GPU. You can use Starling and Feathers Components to drop the task on the GPU. I realize this is definitely not the easy method but it will produce the best results. Blitmask was before the time of easy to use GPU components and I used it myself before, but it's 100% CPU driven. You'll always bog on long text.

Scroll down the list to the "Scroll Text" example here:

http://feathersui.com/examples/components-explorer/

That's about how smooth you would see it on your device. There's a lot of example code out there to get you started.

Here's the basics of starting the Starling engine (contains sample files and starling source):

http://gamua.com/starling/first-steps/

After you try that you can get the latest Starling stable release here:

http://gamua.com/starling/download/

After that you can download Feathers UI Components from here:

http://feathersui.com/download/

Now you'll have 3 folders you need to add to your source path, com.adobe.utils, starling and feathers (found in the 'source' folders respectively).

Once you start a Starling instance like the instructions state you can using the starling.text.TextField to draw your text similar to the flash.text.TextField. Then create a feathers ScrollText component and drop it in. Instructions on that are here:

http://wiki.starling-framework.org/feathers/scroll-text

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 27, 2013 Sep 27, 2013

Copy link to clipboard

Copied

Thanks Sinious

So my current project would need to become a 100% starling project, right? Or can you also incorporate normal as3 that may not be available within Starling?

What I'm getting my head around is - will Starling be able to do everything my current project does now eg load xml prefs files, deal with the GoViral facebook login etc

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 30, 2013 Sep 30, 2013

Copy link to clipboard

Copied

Starling can be a part of your project, it doesn't need to be the entire projects. I have several projects that mix both. It's important to read the tutorials and abide by their guidelines on the GPU though. Most of which will be careful to keep reminding you to remove what you add in general. If you add a listener, remove it. If you create a texture (you'll see what this is), dispose it when done, etc etc. Those concepts will be easy to understand in the getting started part.

The performance increase will be very noticable and you'll be pleasantly surprised.

Just try to start with a whole new "testing" project so you can play with Starling and FeathersUI outside the complexity of the rest of your project.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 02, 2013 Oct 02, 2013

Copy link to clipboard

Copied

Thanks Sinious - having a play with Starling.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 03, 2013 Oct 03, 2013

Copy link to clipboard

Copied

LATEST

Their forums are very active if you wish to ask a question over there so keep that in mind. It's a lot to learn to start. Otherwise feel free to ask here as well.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines