I told you, a lot of stuff is happening lately for Flash developers. I am happy to announce that we just posted a new Flash Player 10.2 Beta on labs. I will not cover here all the questions that are covered already in the FAQ and release notes but I would like to focus on the new features introduced in this new beta:
- Internet Explorer 9 hardware accelerated rendering support – Flash Player takes advantage of hardware accelerated graphics in Internet Explorer 9, utilizing hardware rendering surfaces to improve graphics performance and enable seamless composition.
- Stage Video hardware acceleration – A new method for video playback in Flash Player allows developers to leverage complete hardware acceleration of the video rendering pipeline, enabling best-in-class playback performance. Stage Video can decrease processor usage by up to 85% and enables higher frame rates, reduced memory usage, and greater pixel fidelity and quality.
- Native custom mouse cursors – Developers can define custom native mouse cursors, enabling user experience enhancements and improving performance.
- Support for full screen mode with multiple monitors – Full screen content will remain in full-screen on secondary monitors, allowing users to watch full-screen content while working on another display.
Obviously, there is no much code I can show you regarding IE9 GPU compositing, the Flash Player does this automatically by leveraging the new GPU compositing APIs on IE9 to actually render the Flash Player frames as surfaces and push them on screen through Direct3D9 whatever wmode value you use. Note that graphics computing is still done by the CPU but we use GPU APIs to composite and blit the Flash Player frames on screen. It is similar to what we did in the past with CoreAnimation on MacOS with Safari. This will improve rendering performance on existent content without any modifications.
Concerning Stage Video, this feature has been sneaked at FOTB earlier this year and at Max last month by Tinic. We are very happy to announce that YouTube is already leveraging Stage Video. This will dramatically change the way video performs in Flash and bring native video performance on MacOS, Windows and Linux. For more infos about the YouTube work, check the Flash Player team's blog post.
To get an idea of how StageVideo performs, you can try the StageVideo enabled players here.
Make sure you are running it with Flash Player 10.2 beta.
I wrote a complete article on Devnet which goes into the details of StageVideo and wrote a very simple video player to illustrate how the StageVideo APIs work. Check also Lee Brimelow's great video tutorial about it.
Here is a snaphost of the demo using Stage Video, playing the Big Buck Bunny movie in 1080p on my MacBook Pro :

For comparaison, here is a 720p video playing on YouTube, using about 40% of my MacBook Pro CPUs with Flash Player 10.1 :

Now, let's browse to same video with Flash Player 10.2 with Stage Video, CPUs usage drops to 9% :

Pretty cool, hu ? If you make the test on YouTube, make sure you wait a few seconds, some ActionScript logic in the YouTube player makes the CPU usage go wild for a few seconds before reaching its normal state.
For info, the performance improvements are way bigger if you overlay content on top of video. In some cases, CPU usage can drop from 200% to 10% using Stage Video, check my first post about Stage Video for more infos.
While listening to my track and browsing the web through another tab, the pause and resume feature introduced in Flash Player 10.1 stops rendering the frames and only decodes sound. Flash Player CPU usage then drops to 5% :

But that is not all, we added another nice feature related to cursors. A highly requested feature. The idea is simple, no more Mouse.hide() or onMouseMove handler or startDrag to have a custom cursor. You can now directly work at the OS level and assign your own custom native bitmap-based cursors. Here is a little code sample which illustrates the idea:
// we create a MouseCursorData object
var cursorData:MouseCursorData = new MouseCursorData();
// we specify the hotspot
cursorData.hotSpot = new Point(15,15);
// we pass the cursor bitmap to a BitmapData Vector
var bitmapDatas:Vector.<BitmapData> = new Vector.<BitmapData>(1, true);
// we create the bitmap cursor (bitmaps should not be bigger than 32x32 pixels, this is an OS limitation)
var bitmap:Bitmap = new zoomCursor();
// we pass it to the bitmapDatas vector
bitmapDatas[0] = bitmap.bitmapData;
// we assign the bitmap to the MouseCursor object
cursorData.data = bitmapDatas;
// we register the MouseCursorData to the Mouse with an alias
Mouse.registerCursor("myCursor", cursorData);
// whenever we neeed to show it, we pass the alias to the existing cursor property
Mouse.cursor = "myCursor";
Pretty cool? But wait, there is even better, you can also pass a series of BitmapData objects, then pass a specific frame rate and get automatic native animated cursor:
// we create a MouseCursorData object
var cursorData:MouseCursorData = new MouseCursorData();
// we specify the hotspot
cursorData.hotSpot = new Point(15,15);
// we pass the cursors bitmap to a BitmapData Vector
var bitmapDatas:Vector.<BitmapData> = new Vector.<BitmapData>(3, true);
// we create the bitmap cursor frames (bitmaps should not be bigger than 32x32 pixels, this is an OS limitation)
var frame1Bitmap:Bitmap = new frame1();
var frame2Bitmap:Bitmap = new frame2();
var frame3Bitmap:Bitmap = new frame3();
// we pass it to the bitmapDatas vector
bitmapDatas[0] = frame1Bitmap.bitmapData;
bitmapDatas[1] = frame2Bitmap.bitmapData;
bitmapDatas[2] = frame3Bitmap.bitmapData;
// we assign the bitmap to the MouseCursor object
cursorData.data = bitmapDatas;
// we register the MouseCursorData to the Mouse
Mouse.registerCursor("myAnimatedCursor", cursorData);
// we just pas a frame rate
cursorData.frameRate = 1;
// whenever we neeed to show it, we pass the alias to the existing cursor property
Mouse.cursor = "myAnimatedCursor";
Very simple, but so cool. Game and RIA developers will love this feature.
Another addition, we enhanced the full screen behavior by allowing one screen to stay full screen while working on the other screen. This feature was also highly requested by the community and video industry. Very nice feature for Hulu, YouTube and other video websites.
A lot of people expressed the need to actually detect if the current context allowed the SWF to go full screen. This would allow you to detect this at runtime and react appropriately. Departing from Flash Player 10.2, you will be able to use the allowFullscreen property on stage:
if ( !stage.allowFullScreen )
throw new Error ("Please use the allowFullScreen HTML tag.");
Finally, a little improvement regarding Flash Player version info in the context menu, Here is what you have today when right click, no way to know which exact version you have running :

Here is what you will get starting from 10.2 :

I agree, it was about time. But yes, way easier now
To use those new APIs you need to use the special build 18623 of the Flex SDK 4.5, from the Hero Stable Builds table here.
You also need to use a specific compiler argument –swf-version=11 to target SWF11.
I hope you guys will enjoy those features. Give it a try and let us know about bugs or any feedback you may have, thanks!
Comments (60)
This looks fantastic! Big props to the FP team
Awesome!
Targeting SWF11 will it be possible to draw some triangles using the new 3D API ? If so, any chance of a HelloWorld ?
Do i have to update my gpu drivers or something to make it work?(radeon 4870)
Im watching bigbuckbunny demo from http://labs.adobe.com/technologies/flashplayer10/stagevideo.html
And i got info:
You are using Flash Player : WIN 10,2,151,49
Note : Starting from Flash Player 10.2, if using dual monitors, full screen will always be preserved.
Infos :
Press P, to overlay content
Press F, to go fullscreen
Press SPACE, to pause
For benchmark, press O, to to switch from StageVideo to Video and vice versa.
Context allows fullscreen : true
StageVideo Running (Direct path) : false”
Im pressing O but nothing happens video is still using 80% – 90% cpu
Hi Thibault, looks like the new Hero build’s API is different than the one you used to compile your mouse cursor examples. For example, the MouseCursorData’s constructor doesn’t take any arguments, and Mouse.registerCursor() takes a string and a MouseCursorData object. Anyway, I couldn’t get it to work. I’m always getting “[Fault] exception, information=ArgumentError: Error #2004: One of the parameters is invalid.”
I like the custom mouse cursor.
I’m glad somebody spilled the beans on the custom cursor API. And I’m glad it was bytearray.org.
What’s the trick to getting 10.2 to install in Chrome on Snow Leopard? I ran the uninstaller first, but it only updated non-Chrome browsers.
I download the Flex SDK, and created a new Flex project, but when I set the compiler flag I’m getting an error when trying to build: “Error loading initial content”.
This happens in both FB 4.1 and 4.5 Burrito.
Any ideas??
Hi MarkN,
Good catch. I just fixed this, check the new code. This should work smoothly now.
Let me know,
Thibault
Hi Tom,
In Chrome, go to the URL and type about:plugins
On the top right window, click on Details.
Then disable the Flash Plugin located in :
Applications/Google Chrome.app/
Then close Chrome and install your own version of Flash Player.
Thibault
Hi Shawn,
Can you try with an ActionScript project ?
Let me know,
Thibault
//this works fine
import mx.events.FlexEvent;
// we specify the hotspot
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
var cursorData:MouseCursorData = new MouseCursorData();
cursorData.hotSpot=new Point(15,15)
var bitmapDatas:Vector. = new Vector.(1, true);
var bitmap:Bitmap = new Bitmap(new BitmapData(30,30,false,0xff0000))
bitmapDatas[0] = bitmap.bitmapData;
cursorData.data = bitmapDatas;
Mouse.registerCursor(“myCursor”,cursorData);
Mouse.cursor = “myCursor”;
}
I remember something about Flash Player being able to switch seamlessly between streams depending on the user’s bandwidth? Was this a new feature in FP10.2 or did I dream that?
why aren’t custom cursors using displayobjects or movieclip instead of bitmapdata vector for both static and animated cursors ?
Mouse.registerCursor(MyDisplayObjectCursorClass, hotspot, “some_name”);
hello,
installed 10.2. on mac snow leopard and watch with safari 5.0.3 and i only get audio but no picture (black screen).
is beta not ready for mac yet?
peter
Hey, does anyone know if there is a way to take advantage of these new APIs from within Flash Pro CS5?
FAQ link is broken (starts with a stray ‘|’)
How come this beta has version “10.2.151.49″, while the old square prerelease posted on 2010.09.15 has version “10.2.161.22″?
great news! when can expect a beta for AIR on the desktop for mac & pc?
Hi Shawn,
You probably copied and pasted the flag from Thibault’s post, it doesn’t work. Try typing it yourself, -swf-version=11
Hi Thibault,
I’ve copied and pasted your new code, and I’m still getting the same error:
[Fault] exception, information=ArgumentError: Error #2004: One of the parameters is invalid.
For the following line:
Mouse.registerCursor(“myCursor”, cursorData);
Whoops, seems there are limitations on the bitmap you use as the mouse cursor. I just tried a 24×24 bitmap and it worked.
@Thibault – It works great in a pure AS3 project. I guess it’s a no go with Flex?
I’m actually trying to do a pure AS3 Mobile project, so not really trying to use Flex, just AIR.
Does this support some beta version of Air?
How does work the ‘full screen + double monitor” function ?
I click fullscreen on YouTube but if I click in another app it go to normal mode, like before.
btw, the right clicks -> settings doesnt work, it freezes the video
Firefox – Mac OS X Snow Leopard
ohh I just noticed it doesnt work with Firefox, just with Safari
impressive, most impressive
And once again the new adobe flash plugin breaks this wonderful and very powerful application: http://www.aviary.com/online/filter-editor?fguid=a902b9ee-c547-102b-b565-0030488e168c#
Hi Thibault,
StageVideo worked on my work iMac (6% cpu for 1080p). However i can’t get it to work in my new home iMac. I tried everything:
1. Restarting
2. Updating Safari
3. Starting clean: Uninstalling Flash player, rebooting and installing the new 10.2 player.
4. Trying the debug player.
Everytime i start the video the cpu rises to 80% and drops to 45% when buffering is complete. This is nowhere near the 6% i got on my work Mac.
Also when you uncheck hardware acceleration in the settings dialog the video’s don’t show (just a black area).
@ Remco:
you should check if hardware acceleration is activated in the right-click menu of the flash player.
that solved it for me. look here:
http://bugs.adobe.com/jira/browse/FP-5856
It seems that Ant no longer works in this latest sdk?
Hey! I wrote a simple CursorManager class to help register cursors and assign them to InteractiveObjects: http://goo.gl/EvBPa
I hope this helps!
The new cursor support is something that would have helped a lot in a past project. We solved the problem by faking OS calls.
One thing that would be good to have, is support for more native cursors, the wait/hour-glass cursor comes to mind right now. What about this?
One could simulate it with this new implementation, but what if we want to use the native cursor? the use may have a custom one.
Also, as pete asked, can we test these new features with Flash CS5?
Just spent the last 2 months working on a chat app.. installed 10.2 beta.. now 90% of the animated .gifs I am using are broke. Go figure
When I said “the use may have a custom one” meant “the user…”, of course.
BTW, it would be nice if you could add support for communicating with COM ports, and also if AIR would not be treated as a separate “environment”. I think Silverlight with its out of browser feature is superior in this sense, and SL 5 is going to support communication with COM.
i was fed up to wait, to i did this :
http://why.pastebin.com/hP00AfNM
public function parsecursor(DP:Class, spot:Point = null):MouseCursorData
Put any displayObject class you want, and the spot point ; the method will return the generated MouseCursorData. If you put a MovieClip based Class, it will try to parse every frame to generate animated cursor.
Great update. I’m currently developing a drawing app and the native mouse cursor is really handy, however, i noticed there was a change in BitmapData behavior.
I still wasn’t been able to track what exactly changed, but i believe the BitmapData draw() method is currently overriding alpha values, instead adding (previous behavior). Not sure if it’s a bug or a change. If it’s was a design decision, i think it deserves some documentation.
Thanks.
I was tinkering around and found out how to solve the problem. I passed in a ColorTransform with all 3 multipliers set to .99
Whenever you pass the colorTransform as null or a ColorTransform object using multipliers set to 1, the bitmapdata is cleared.
MicrophoneEnhancedOptions (AEC) isn’t working yet in the current public release, but it will be?
http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/media/MicrophoneEnhancedOptions.html
Jan,
Thibault
Dear Thibault,
when AEC will come finally to some release? It seems that Hero build 18623 doesn’t support it.
Or it’s already there? It’s hidden? And what your meant in reply to Jan?
Regards,
Alex G.
The wewaii game have kind of question run flash player10.2
Flash you have a beautiful future boy….. Another thing Flash camp @ chennai(INDIA) … in my native town…… ooohhhh going enjoy Dec 11
I found that some pixel-perfect collision detection is bugged in this version of flash.
Can we test these new features with Flash CS5?
Hi g,
Can you please describe the steps to reproduce, so that I can follow up on the bug. Thanks a lot!
Thibault
Hi Thibault!
I have this error:
TypeError: Error #1006: registerCursor is not a function.
atCursorTest/createStaticView()
atCursorTest()
How to solve this trouble?
Thanx!
Hm, when I “Debug” in FDT – it runs ok,
but with “Run” – fail!
Why? What is different??
Hi Dimpiax,
Make sure you use the –swf-version=11 compiler to target SWF11 APIs.
Let me know,
Thibault
Certainly, I compile with argument:
-swf-version=11.
Here is:
-static-link-runtime-shared-libraries=true
-target-player={playerVersion}
-library-path+=”{flexSDK}/frameworks/locale/en_US”
-default-size=550,400
-swf-version=11
Difference in run compiling, between “Debug” and “Run”.
Same with StageVideoAvailabilityEvent class.
VerifyError: Error #1014: Class flash.events::StageVideoAvailabilityEvent could not be found. =/
hi, thibault!
i am transcribing your video @http://blog.theflashblog.com/?p=2468. but there are some parts i cannot understand. can you help me? here are some of’em:
on 0:24 (and the guy [...] is a mole.)
on 0:34 (it’s like what we call [...] direct path)
on 0:42 (t actually composite that in the [...] )
on 0:49 (sitting behind the [...] which is CPU-composited.)
on 0:53 (we have the [...] on the GPU core)
on [1:28] (and… you’ll be able to have content covering the 3-D, 2-D tandem covering the 3-D [...])
on 4:19 (articles about like [...] or [...] shaders because is gonna give you a better idea of). and there are a couple of others.
( by the way, sorry for posting under wrong page :S )
Hi mac fan,
No worries!
Details inline :
on 0:24 (and the guy [...] is a mole.)
and the guy, our lead engineer is a mole.
on 0:34 (it’s like what we call [...] direct path)
it’s like what we call internally, the direct path
on 0:42 (t actually composite that in the [...] )
to actually composite that in the display list
on 0:49 (sitting behind the [...] which is CPU-composited.)
sitting behind the display-list which is CPU-composited.)
on 0:53 (we have the [...] on the GPU core)
as soon as we have data on the gpu card memory
on [1:28] (and… you’ll be able to have content covering the 3-D, 2-D tandem covering the 3-D [...])
and… you’ll be able to have content covering the 3-D, 2-D tandem covering the 3-D content.
on 4:19 (articles about like [...] or [...] shaders because is gonna give you a better idea of). and there are a couple of others.)
articles about like GLSL or ARB shaders because is gonna give you a better idea of). and there are a couple of others.
Hope it helps!
Thibault
thibault, sooo much thanks for your answer. and if i’m not too much, i finally request you help me with these parts:
3:12 – some more [...] APIs
4:38 – from the [...] triangle
5:24 – and [...] that on the GPU
5:58 – so [...] at 60 Hz
6:21 – gonna be really [...] a lot of people
6:50 – the 3D [...] as easy as [...] 2D
7:09 – -hey, buddy! -hey! -[...] -no more milk.(i think the guy asks smt.)
8:13 – when and what kind of APIs [...] for people
8:18 – you know very simple flash [...] APIs.
8:48 – yes, [...] this coming pretty soon.
8:54 – yes, [...] bye.
i’m looking forward for your answer…
In combination with an Nvidia card and Ubuntu 10.04 Linux it doesn’t accelerate anything. Framerate is lousy regardless of activated StageVideo. Still some work to do for Adobe.
Hi Andreas,
Did you install the VDPAU library ?
http://www.arielbrailovsky.net/adobe-flash-player-10-2-beta-with-stage-video-using-vdpau-hardware-acceleration-ubuntu/
http://en.wikipedia.org/wiki/VDPAU
let me know,
Thibault
Yes, I use the VDPAU library in combination with XBMC and it works really well – but not for Flash, for whatever reason.
Yes cpu usage of flash is way down, but the kernel_task is still eating loads of cpu, at least on the latest MBP 13″ and MBAs.
kernel_task using 20-25% cpu while playing back youtube stagevideo, even after having waited for the whole file to load, so its not due to the airport driver while downloading.
Just like g, pete and Hector asked.
How can I use these new 10.2 features when compiling in CS5?
Trackbacks/Pingbacks (16)
[...] the blog post about FP 10.2 by Thibault Imbert about [...]
[...] http://www.bytearray.org/?p=2373 发表评论 | Trackback No Related Post 目前还没有任何评论. [...]
[...] info: Adobe Flash Player 10.2 Flash Player 10.2 Beta: Stage Video Introducing Flash Player 10.2 Beta! Getting started with stage [...]
[...] the blog post about FP 10.2 by Thibault Imbert about [...]
[...] Thibault Imbert has a post on his blog showing and example of how the new MouseCursorData object and API will work. [...]
[...] has a great blog entry on stage video and other goodies in the FP 10.2 Beta so be sure to check that [...]
[...] Более подробно о нововведениях можно узнать здесь – http://www.bytearray.org/?p=2373 [...]
[...] Flash Player 10.2 Beta Released Adobe clearly isn’t sitting around resting. A new beta for Flash Player 10.2 has hit public release. This one contains the much talked about Stage Video that puts video rendering in the hands of the GPU thereby cutting down your CPU usage to just a few percent while watching HD video. Thibault Imbert has all the details for you: http://www.bytearray.org/?p=2373 [...]
[...] has recently launched a new version of the Flash Player. 10.2 beta addressed some of the problems, including power consumption as well as hogging of system resources. Given the advances of HTML5, [...]
[...] a month ago, Flash Player 10.2 was announced. Lost in all the hoopla about the upcoming Flash Player 11 with low-level 3-D APIs [...]
[...] more about it: http://www.bytearray.org/?p=2373 No Comments by Elliot Mebane / December 28, 2010 / Posted in: Adobe, [...]
[...] covered the list of features a few weeks ago, Flash Player 10.2 ships with Stage Video for high performance video playback and also the very [...]
[...] covered the list of features a few weeks ago, Flash Player 10.2 ships with Stage Video for high performance video playback and also the very [...]
[...] http://www.bytearray.org/?p=2373 [...]
[...] подробно о нововведениях можно узнать здесь – http://www.bytearray.org/?p=2373 Share this:TwitterFacebookLike this:LikeBe the first to like [...]
website…
Introducing Flash Player 10.2 Beta! – ByteArray.org…