Using Video.smoothing with the FLVPlayback Component

Friday, February 29, 2008 by Mistlee

February 29, 2008

Hey gang. Thanks for tuning in today on the Leap Day edition of FlashNewz. Today on Leap Year is the time of year when a portal in space opens up to allow creatures from alternate dimensions to pass through into our world. I think I read that in a science book once.

Well, maybe not but it's nice to let the imagination let loose once in a while. Spending too much time thinking about old people stuff will make you feel like old people stuff. Thinking young and acting young is the key to being young. And an active imagination is the spirit to creativity.

My tastes in entertainment media are usually pretty adult for the most part, but every now and then I can appreciate the merits of family-friendly good-natured wholesome faire. There's a lot of junk to sift through in all-ages content but from time to time a gem can be found. That's the case in this week's featured sites that have some imagination inspiring material combined with beautiful animation and design for Professor Layton and the Curious Village, Tomy toys, and The Spiderwick Chronlicles.

Also have Stefan with us again showing off some excellent advances in smoothing the pixels often seen in flash video.

Hope you enjoy! I'm out.

Mark Rivera

For any thoughts or suggestions for a website to be featured in FlashNewz gimme a shout at

And don't forget to check out our Flash Directory

Using Video.smoothing with the FLVPlayback Component

Stefan Richter By Stefan Richter

Sometime last year Fabio asked this question on his blog:
“Every day on the web new video related sites appear. Video sharing, video delivery sites or simply mashups, all Flash Video based. I’m very happy about this but there is a thing I can’t understand and it is : why very often is video.smoothing property not used ? This is completely obscure to me because in my opinion a smoothed video is always better than a blocky one.”

Of course he’s right, video.smoothing is simple yet effective, once turned on your video will look a lot better.

Take the following example.

On the top you see the intro screen of a movie trailer with smoothing turned on, and on the bottom the same screen without smoothing (it looks bad because this video was scaled down quite heavily). Big difference, the top one looks a lot better.
Unfortunately smoothing (a property of the Video object in Flash/Flex) is turned off by default. To turn it on you simply set smoothing to true. Something like

myvideo.smoothing = true;

But what i you’re using the FLVPlayback component? How does one access the underlying video object there? It’s quite simple really if you know where to look. The FLVPlayback component uses the VideoPlayer object under the hood, and VideoPlayer extends Video and therefore inherits the smoothing property.
Say you have a FLA file (AS3) with an instance of the FLVPlayback component on stage and named it flvpb. You simply need to add the following code to enable smooting:

var videoplayer:VideoPlayer = flvpb.getVideoPlayer(0);
videoplayer.smoothing = true;

Note that you have to specify an index when calling getVideoPlayer(), but if you are not dealing woith indexes then it should normally be 0 anyway.
Hope this helps, go use it and tell your friends how smooth you are.


About The Author

Stefan is a certified Flash Developer who has been involved with Flash Media Server since its very early days. From his home office in the UK he has handled a variety of projects, specializing in Flash Video and Rich Internet Applications for clients that include CNET, USA Network and Unilever. Stefan is the author of a series of Adobe Developer Center articles, has spoken at several industry events and contributes a regular column on Flash Video to Streaming Media Magazine. His site is one of the largest online resources on Flash Video.