Want to know exactly what is new in Flash Player 10? Through looking at the latest SWC, "zazzo9" has posted a full list of what new things Flash Player 10 is capable of. This list is a goldmine for anyone experimenting with the new player. The list contains new events such as exit_frame and frame_contructed as well as a host of 3D features.
With each new Flash Player comes new possibilities and as usual, it's left to the community to figure out what those are. "zazzo9" has produced a dump of new features using a disassembler tool called SwfDump. The list is extensive, but here is a short version highlighting only the new features available and what they probably offer.
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 our interview with Adobe's Tom Barclay he mentions these features as eeither 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 Class - Allow 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 (antialiasing?). 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, PerspectiveProjection, 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.
This article is not yet finished. What's remaining is essentially the new text related classes. They're very exensive!
Written by : Jens C Brynildsen
Original post : http://www.flashmagazine.com/news/detail/detailed_list_of_new_flash_player_10_features/
No comments:
Post a Comment