»
S
I
D
E
B
A
R
«
Adobe Flash Player 10 Features
May 30th, 2009 by Anish Kumar

With each new Flash Player comes new possibilities and as usual, it’s left to the Flash community to figure out what those are. Here is a short version highlighting only the new features available and what they probably offer.

3D effects New

Create more intuitive, engaging interfaces using built-in support for 3D effects. Get started quickly without being a 3D master by designing in 2D and easily transforming and animating in 3D. Fast, extremely lightweight, and simple-to-use APIs, along with 3D tools in Adobe® Flash® CS4 Professional software, make motion that was previously accessible only to expert users via ActionScript® language or custom third-party libraries available to everyone.

Custom filters and effects New

Create high-performance, real-time effects for cinematic experiences that quickly engage users. With new Adobe Pixel Bender™, the same technology behind many filters and effects in Adobe After Effects® software, these dynamic and interactive effects can be used both in production with After Effects CS4 and live with Flash Player 10. The Pixel Bender just-in- time (JIT) compiler can also be used to process other types of data, such as sound or mathematical functions, asynchronously in a separate thread.

Advanced text support New

Take advantage of a new, flexible text engine that brings print-quality publishing to the web, building on more than 25 years of Adobe expertise in typography. Gain more control over text layout using the Text Layout Framework, an extensible library built on the new text engine in Adobe Flash Player 10, which delivers advanced, easy-to-integrate typographic and text layout features for rich, sophisticated and innovative typography on the web. Create multilingual web applications using device fonts that can now be anti-aliased, rotated, and styled, or build your own unique text components.

Dynamic sound generation New

Use enhanced sound APIs to dynamically generate audio and create new types of audio applications such as music mixers and sequencers, real-time audio for games, and even audio visualizers. Work with loaded MP3 audio at a lower level by extracting audio data and supplying it to the sound buffer. Process, filter, and mix audio in real time through the Pixel Bender JIT compiler to extend creative freedom beyond the visual experience.

Drawing API Enhanced

Perform runtime drawing more easily with restyleable properties, 3D APIs, and a new way of drawing sophisticated shapes without having to code them line by line. Developers can tweak parts of curves, change styling, replace parts, and use custom filters and effects, delivering improved throughput, creative control, and greater productivity. Enhancements to the Drawing API add the z dimension, real perspective, textured meshes in 3D space, a retained graphics model, read/write rendering, and triangle drawing with UV coordinates, while adding memory and improving performance.

Hardware acceleration Enhanced

Use the hardware processing power of the graphics card to paint SWF files into the browser and accelerate compositing calculations of bitmaps, filters, blend modes, and video overlays faster than would be performed in software.

Vector data type New

Use the new typed array class for better performance, efficiency, and error checking of data. Lee Brimelow recently put out a Flash Player 10 tutorial where he shows how to use the new Vector type.

Dynamic Streaming New

Show exceptional video with streams that automatically adjust to changing network conditions. Leverage new quality-of-service metrics to provide a better streaming experience.

Speex audio codec New

Take advantage of the new, high-fidelity and open source Speex voice codec, which offers a low-latency alternative for voice encoding. Flash Player also supports ADPCM, HE-AAC, MP3, and Nellymoser audio.

File upload and download APIs Enhanced

Bring users into the experience by letting them load and save files from your web application. New file reference runtime access allows local processing of data without roundtripping to the server.

Color correction New

Deliver web applications with accurate color, so your favorite web destinations look the way they were intended. Color correction works with the monitor’s ICC color profile and allows you to convert SWF files to standard RGB.

New classes:

Vector Class – Offers arrays with Type checking. Should (in theory) be faster than ordinary arrays and easier to debug since they’ll only accept the correct data type. Lee Brimelow recently put out a Flash Player 10 tutorial where he shows how to use the new Vector type.

GraphicsBitmapFill and GraphicsEndFill Class – New classes for handling filling of bitmaps, great for creating shaders (textured triangles) on 3D models. Supports a matrix for advanced distortion as well as a smoothing option. In an interview with Adobe’s Tom Barclay he mentions these features as either CPU or GPU accelerated.

GraphicsGradientFill, GraphicsSolidFill, GraphicsStroke and GraphicsPath Class – Same as above, but for gradients and line drawing.

GraphicsTrianglePath Class – Object for storing one single 3D triangle, complete with geometry, normals, culling and mapping data.

Shader ClassAllow you the create custom shaders for 3D graphics. In 3D, a Shader applies rendering effects such as shadow, motion blur, specular highlights and other visual enhancements to 3D geometry at the time of rendering them to screen. This process makes fairly simple 3D models look visually richer than they really are. Rob Bateman has created a good example of what shaders are and what they offer for 3D in Flash. I initially thought this class had to do with 3D shaders, but according to Zeh Fernando, this class is related to Pixel shaders – thus shader is here just another word for Pixel Bender generated effects. Too bad – then again – Pixel Bender was built to “bend”. Maybe somebody can figure out how to make 3D shaders using it?

The Shader class has several supporting classes such as ShaderInput, ShaderJob, ShaderParameter, ShaderParameterType, ShaderEvent, ShaderFilter and ShaderPrecision. From looking at the ShaderParameterType class, It looks like the shaders will support up to four levels of rendering quality (anti aliasing?). Very promising indeed!

SamplesCallbackEvent Class – Allows you to get and set the position in the audio data as well as inject audio samples into the audio stream on your machine. I reality this, combined with the extract-method in the Sound Class makes it possible to generate any kind of sound as well as mix, add filters and more.

Matrix3D Class – to render objects from 3D space to a 2D representation, you use a matrix function. This new matrix class is native to the Flash Player, offering a massive speed enhancement. The old matrix functions were not native so any 3D engine will get a nice speed boost just from adding support for this feature alone. The class offers a large set of methods for working with the matrix such as interpolation, decomposition and transforms. Related to this class is also the new classes Orientation3D, Perspective Projection, Transform, Utils3D and Vector3D.

New methods in existing classes:

BitmapData Class – now supports getting and setting Vectors (getVector/setVector)

BlendMode class – provides constant values for visual blend mode effects. This class has a new static constant called SHADER. Shaders are often associated with rendering of 3D content. Interesting!

DisplayObject Class – This class handles all the display of objects in Flash (as the name implies). What’s new is that EVERY single object now supports the third dimension. Where you formerly could set the X and Y position, you can now also set the Z position like this:

myMovieClip.z = 100;

Every object can rotate around the X, Y and Z axis (rotateX, rotateY, rotateZ) as opposed to formerly only being able to rotate in 2D. See Lee’s 3D tutorial for an extensive example of this. You can also scale along the Z axis (scaleZ) as well as set the blendShader. Setting the blendShader sounds like it could be a way for using Pixel Bender to calculate the texture. Senocular has posted a tutorial that indicates this. This tutorial also mentions Graphics.lineShaderStyle(), a method not in the current Flash Player 10 beta, so it’s clear that somebody in the community has a more recent version as well as some official documentation…

Graphics Class – Handles all the drawing of graphic primitives in the Flash Player. There’s several new methods here. Some handle 3D drawing and some enhance the existing functionality. According to Adobe some of these commands can now be calculated by the users graphics card processors (GPU) for a massive speed boost.

Stage Class – has a new property for getting and setting the ColorCorrection according to the viewing monitor’s ICC color profile. In theory, this should improve color fidelity – given that the ICC profile is correct.

Event Class – In AS3, we rely on events for most everything we do. New core events are related to text enditing (Clear, Copy, Cut, Select all, Paste), audio (samples_callback) as well as movie playback (Exit_frame and frame_constructed) . These latter two are especially interesting as exit_frame brings a feature many Director developers have been missing. They both give you more granular control over when your code is executed. Should prove very useful for component development and could potentially rid us of the ever annoying “When in doubt – wait one frame“.

Microphone Class – This class gets new methods for getting and setting the audio codec. Flash Player 10 offers the new speex codec in addition to the existing and proprietary Nellymoser codec. Speex is a free, open source codec that is patent free so this is yet another great move towards openness from Adobe. This class now has a supporting class with constants for the two possible codecs (SoundCodec Class).

Sound class – This class has two new functions and that’s all we need… The Sound.extract command will pull out audio data as a ByteArray so you can manipulate it as you please. Using samplesCallbackData, you can then write those data back to the audio stream. Keith Peters has a great sample with code on his blog.

FileReference Class – now have two new commands for loading and saving files straight from the users desktop. No more uploading to a server for manipulating files.

NetConnection and NetStream Class – These classes have several new features for anabling Peer 2 Peer (P2P) features via Flash Media Server. Some good discussion on the P2P feature at this blog with Justin Everett Church chiming in at the end to clear the air of confusion.

NetStreamInfo Class – Has been enhanced with several useful features that are probably related to the new dynamic streaming capabilities. Using the information provided by this class, other video streaming server vendors should be able to support similar features. There’s two related classes that has changes as well: NetStreamPlayOptions and NetStreamPlayTransitions. These will allow for swapping streams while playing transitions, a feature I had planned to add for the AS3 version of video.maru.

Capabilities Class – gets a “hasColorCorrection” method. Probably a good idea to test agains this one before trying to set the color correction on the Stage object.

About Anish:
Mac OS X software development is my bread winner with over 6 years of experience. Expertise in Color Management, TWAIN Scanner drivers on Mac OS X, Photoshop Filter and Import Plugin development on Mac OS X, iPhone. As an hobby I love to work on PHP, Flex, AIR, Photoshop. Check the 'About' page for more.

Leave a Reply

Spam protection by WP Captcha-Free