From 12 to 24 layers and other gimmicks in Flash Player 8
Here are a few quickies from Flash Player 8, these are mostly bugs I fixed and remember being important, but there were hundreds more overall:
I am sure you'll find more as time goes on. But and that is usual when writing software we needed to stay realistic. We were not able to fix every issue which was reported and had to select the ones which we think had the greatest impact for users.
Enjoy Flash Player 8!
- Flash Player 8 now supports up to 32 sound channels (Flash 7 or older files are still limited to 8 though so things stay compatible).
- We upped the maximum number of allowed overlapping layers using alpha transparency from a total of 12 to 24. This will probably mostly be welcome if you use blend modes.
- Doing alpha only color transformations on bitmaps is now about twice as fast as in Flash Player 7.
- Rendering bitmaps is faster and/or consumes less CPU on a Mac when using Safari compared to an equivalent clocked PC. This is mostly due to the OpenGL support but also the MUCH improved bitmap drawing routines which are specifically designed to run well on PowerPC.
- Flash Player 8 will now clip overlarge vectors. In Flash Player 7 or lower scaling objects too large would cause corrupted display.
- Flash Player 8 can now render bitmaps much much larger than the stage. Try to load a PNG which is 8000 x 256 pixels large it will still render unlike in Flash Player 7.
- Text metrics in ActionScript are now returned as numbers instead of integers making them more precise.
- Text leading and indent can now be set to negative numbers in the TextFormat API.
- Various artifacts when overlaying vectors on top of video have been eliminated.
- Alpha values in the Drawing API are now converted to numbers internally instead of being cast to integers. The result is that you'll get the whole range available internally which is 256 different alpha values. Yes I know we should have used the 0..255 scale in the first place in ActionScript, but we needed to stay compatible with the old APIs.
- Gradients can now have up to 16 colors instead of just 8 when using ActionScript.
- Setting NetStream.onStatus in the Mac will not freeze or crash the browser anymore when reaching the end of playback of a progressive FLV.
- The NetStream object now sends "NetStream.Seek.Notify" messages even for progressive FLVs. This message tells you when a seek has successfully completed.
- The NetStream object now sends "NetStream.Seek.InvalidTime" status messages when you try to seek to a invalid time for progressive FLVs. Invalid time means that either the data is not downloaded yet or your seek time is past the end of the file.
- The NetStream object now sends "NetStream.Buffer.Flush" status messages when the buffer is being emptied, f.ex. when you reach the end of a file. This is helpful especially if videos are shorter than the buffer time you selected. In this case the "NetStream.Buffer.Full" message was never send making it difficult to build UIs around it.
- On Mac you can now load a local progressive FLV from something else than the boot drive.
I am sure you'll find more as time goes on. But and that is usual when writing software we needed to stay realistic. We were not able to fix every issue which was reported and had to select the ones which we think had the greatest impact for users.
Enjoy Flash Player 8!


12 Comments:
The audio improvements are most welcome, thanks!!
Any chance of getting an updated audio engine at some point with new features? :)
Tinic,
Here is another major perfomance bug to fix in Flash Player.
In FP 7 and FP 8, all string algorithms are in O(n^2) !
I suspect the internal string buffer reallocation to be very, very badly written.
The 'escape' function below is just an example of string operation, what matters is
the internal string management done by Flash Player.
trace( getVersion() );
s="e";
n= 1;
while( n < 4000000 )
{
if( n > 4000 )
{
t1= getTimer();
var ee= escape(s);
t2= getTimer();
trace( "n="+n+": time/n constant="+(10000*(t2-t1)/n) );
}
s += s;
n *= 2;
}
WIN 7,0,19,0
n=4096: time/n constant=0
n=8192: time/n constant=0
n=16384: time/n constant=0.6103515625
n=32768: time/n constant=0.6103515625
n=65536: time/n constant=0.762939453125
n=131072: time/n constant=1.373291015625
n=262144: time/n constant=3.7384033203125
n=524288: time/n constant=18.9590454101563
n=1048576: time/n constant=54.6646118164063
n=2097152: time/n constant=118.07918548584
WIN 8.0.15.0
n=4096: time/n constant=0
n=8192: time/n constant=0
n=16384: time/n constant=0.6103515625
n=32768: time/n constant=1.8310546875
n=65536: time/n constant=1.068115234375
n=131072: time/n constant=3.96728515625
n=262144: time/n constant=7.66754150390625
n=524288: time/n constant=24.9862670898438
n=1048576: time/n constant=58.1836700439453
n=2097152: time/n constant=118.045806884766
The value time/n should be approximatively a constant in any other standard development SDK, mmh? :-)
its posible in future ofcourse ... that flash will get accelerate with OpenGL ? this graphic standard is on many many systems ... its poslible ?
Thank you, this is very usefull for me.
Persian Diviner & Iran
How about the layering of PNGs with alpha channels? Currently, the layerng of <n> [n b/c MACR doesn't recommend > 1 layered PNG w/alpha, and testing this has produced varied results] PNGs with an alpha channel corrupts the drawing of the bottom layered PNG with alpha; simply put, the bottom layer disapears when overlapped by other PNGs with an alpha channel.
...in case you're wondering where this might be used, think of a product configurator...think of assets to that product with patterns, such that a color transformation via AS won't get the job done...
-riley
Brian Riley
I would second that OpenGL aspect. Flash is superb for design, but right now it is not able to compete with OpenGL based UI's. If Flash would enable OpenGL, we had a furious tool to build games in record time !!!
Cya, Bernd
My site got dramatically slower with player 8 (win 8,0,15,0).
If you have time please check the sunflower in references section. After completing the petals, CPU usage remains around 80%. it was around %10 in player 7.
http://www.rivena.com
this site was done with Flash 6.
(my system: athlon 2000, radeon9000pro, windows xp sp2)
i would bitmapcache vector clipped raster petals to gain some speed, if i had flash 8 :) my site needs a lot of optimazing but this extra slowness in player 8 is strange.
a troubled old demo scener from istanbul/turkey
Congrats for finally adding clipping for large vectors :)
It's a great pleasure reading your blog and look at Flash from a different perspective.
Hi, I've a problem where FLV's crash the browser on events (cuepoints or FLVPlayback.complete) this only happens in the 8 player and not the 7 player, is this a known issue? In the 7 player the project runs perfectly. This is 4 months of work and is due to go live in 2 weeks, a large scale project using live footage and 3d. What a nice xmas present. matthewmuller@gmail.com
i have the same problem with product configurators, overlaping many transparent png (photos) will eventually cause the lower layers to dissaper and slow the system down...
can we use myMC._quality = "medium" or low on some of these transparent pngs? will this help?
i know if i right click the swf and choose quality low or medium it helps, it brings back the lost pngs but then the whole movie looks worse... (no smoothing)
any ideas???
Thanks!
I get this weird set of Info Objects being reported when I'm streaming a flv.
I will get NetStream.Buffer.Full, NetStream.Buffer.Flush, NetStream.Buffer.Full, NetStream.Buffer.Flush
it keeps going (those two Info Objects) while the file is playing. Why is the buffer being flushed? I'm not having it flush anywhere in my code
I am having the same problem with a configurator - drawing 5 fairly large png layers to the screen at once causes noticeable lag. Any suggestions?
Post a Comment
<< Home