The ActionScript 3 Programming Language
High-Speed ActionScript 3 Compiler
The high-performance compiler, generating effective executable code, is a key component of Rio software. It allows for maximum flexibility for web developers and flash programmers. With the unique Rio compiler, you can track down compilation errors more quickly and smoothly. Additionally, Rio compiler reveals to a user the potentially unsafe code constructions:
- Unreachable code
- Unused local variables
- Unused private properties
- Unused imports
- Hidden catches
- Assignment and comparison to the same variable
- Empty control statements
Support for ActionScript 3 Libraries (SWC)
Rio offers extended support of the existing ActionScript 3 component libraries (SWC). It gives you the leverage of using executable code and media resources of the ActionScript 3 components in your applications. Moreover, you can choose the type of linkage for each library.
Rio allows the following embedding methods:
- Absolute embedding of all classes in a library and a possibility of putting them into a specified frame on a timeline*.
- Embedding of the particular types required for the compilation.
This option is used by default. Every type will be embedded into the frame, where it is needed for the first time.
- No Embedding
Embedding of types from a specified library will be blocked, even though these types are required during compilation.
* You can set a frame number to ensure that all library types will be embedded into ActionScript 3 component by this very frame. Please keep in mind, the type can be embedded into the prior frame if it is required to assure the correct work of the compiled code.
Intelligent Export of Assets
One of the most valuable options supported by Rio is the possibility to export external assets and movie clips directly into an SWF file. After embedding, assets can be easily managed in the ActionScript 3 code.
Rio can automatically generate and compile a piece of code to control an asset. You will just need to specify an ActionScript 3 class name linked with the asset. Alternatively, you can customize an auto-generated version.
Interaction with Instances on the Main Timeline
With comprehensive Rio functionality, you gain access to any visual instance on the main timeline (vector and bitmap graphics, clip masks, movie clips) in the ActionScript 3 code.
SWF Output with ActionScript 3 Debug Information
Detailed debug information provided in Rio-created Flash content allows you to easily analyze the internal layout and logic of your application work and find issues, which cannot be detected at compilation stage.
Raster Graphic Formats
Rio enables embedding of the most common raster graphic formats:
- PNG with alpha-channel transparency
You can choose the preferable format of the embedded images (Lossless PNG or Photo JPEG) or keep the original format only for JPEG, PNG, and PNG with alpha-channel transparency images. Other formats will be transformed either to Lossless PNG or Photo JPEG.
Additionally, you can set the new dimensions for each image:
- Fixed width and height parameters
- Either height or width maintaining aspect ratio
Rio supports embedding both TrueType-Fonts (TTF-files) and TrueType-Collections (TTC-files). When using TTC-files you need to specify the font number in the collection.
There are four font embedding options available:
- Embedding kerning information
Embedding kerning information for many commonly kerned characters improves text visualization, but increases SWF file size.
- Embedding text characters
You have the options to embed either the entire font or only text characters. Furthermore, you can set the list of characters that must be embedded into SWF in any case.
- Setting the font style
You can indicate the font style - normal, bold, italic or bold italic.
If the original font style is different from the indicated, each character will be properly converted.
- Renaming the font
You can redefine the generic font name and use it in ActionScript 3 or text objects.
The embedding of some TrueType fonts may be officially restricted. In order to accomplish embedding, please check the license agreement whether embedding rights are granted or not. Rio does not automatically perform any copyright info checks.
Audio (WAV, MP3)
Rio empowers you to embed WAV and MP3 audio files into your application. It's notable that you can specify the embed format for each audio file. Furthermore, Rio allows you to keep the original format of the embedded audio, if it is possible. In this case, WAV will be recognized and embedded as 'Uncompressed' and MP3 files as 'MP3'. Additionally, you can set the audio compression rate or keep the original audio preferences.
Rio gives you the advantage of using the most popular video formats (AVI, MPEG, etc.) Along with the embedding video, you can set resolution settings and specify video and audio bitrates. If necessary, you can even exclude the audio stream keeping video only.
Shockwave Flash Content
With Rio, you get professional applications enriched with Shockwave Flash content.
Similar to audio, video, and other content types, you can embed Shockwave Flash content into SWF.
Other Content Types
With Rio, you get unlimited opportunities to embed content of any format.
Any type of data, even if it is not supported by SWF Data Format directly, can be embedded into an SWF application as a binary array. ActionScript code can utilize this data, for example, as shaders for graphics hardware.
You can embed such data into SWF by:
- Indicating a path to the computer file;
- Determining the data inside CDATA section.
You can select the most preferable embedding method according to your needs.
Vector and Bitmap Graphics Support
With Rio, you can use Flash format to its fullest advantage with timeline-based multimedia.
- Vector and Raster Graphics
- Movie clips
- Audio and Video Playback
- Text Elements
- Advanced Clip-masking
- Per-frame Control over Instances
Rio incorporates support for two major types of graphics: vector and bitmap.
For vector graphics, Rio handles the following types of vector primitives:
- Elliptic arc (open and enclosed)
- Polygon (open and enclosed)
- Path (open or enclosed sequence of cubic Bezier curves, quadratic Bezier curves and linear segments).
To create complex vector objects consisting of two or more contours, you can combine figures listed above into the shape groups.
A shape group is a range of geometrical figures that has its coordinate plane. Every figure of the group has its own position, rotation angle, and scale on its plane.
Similar to primitive objects, shape groups can also be a part of another group.
The shape of both the primitive objects and groups can be changed with transformations (translation, rotation, scale, skew). What's remarkable is that it's the transformed shape that is embedded.
Vector geometrical shapes are used for creation of visible screen objects and clip masks.
Every visible vector object can have one fill style and one line style.
- Solid fill
- Bitmap fill
- Gradient fill (radial and linear)
Bitmap and Fill Styles can be used in a combination with the transform operations (translation, rotation, scale, skew). You can change the standard mapping technique to get a larger variety of effects.
Line styles can be based on any kind of the fill styles listed above. Basically, line styles have all the features of fill styles and include additional specific features (depth, surface of the ends and joints, and others).
Additionally, you can use bitmap graphics to display objects on the screen. The basic option is a rectangle which has a raster image inside. For more complicated effects, you can use a combination of vector shape and bitmap fill style. In this case you are limited neither by the shape form selection nor by the method of embedding.
Rio currently supports the following properties of a Movie Clip:
- Movie Clip hierarchy
- 9-slice scaling grid support
- Export of a Movie Clip to ActionScript 3 as a child class from flash.display.MovieClip (by default) or any other class.
Audio and Video
You can embed video and audio directly into SWF application. This approach is very useful if there is no access to the external files when playing an SWF file, or if an SWF is created in "all-in-one" output format.
For text elements in your project, you can specify embedded and device fonts. All types of dynamic text elements are supported - read-only elements, input types etc.
With Rio, you can specify the Z-Index property of every display object. It defines Z-position of the object in regards to other visual objects.
Z-Index is like the third coordinate in addition to X and Y.
Z-Index property has the following features:
- Z-Index, similar to X and Y, can be changed in any frame of SWF regardless of the properties of other objects.
- No need to keep specific placement order of the objects to reach proper overlapping.
- One and the same Z-Index value can be assigned to any number of objects on the screen*.
* In this case the last added object will overlap all other objects with the same Z-Index added earlier.
Clip-masks are invisible vector display objects that affect visible objects or groups of objects.
Masks are essential when you need to make a display object or a group of objects partially or fully invisible.
Two types of masks can be used for clip-masking:
Used for masking a particular visual object.
Used for masking all display objects including other Z-Index-masks with the specific Z-Index.
Both types of masks support standard transform operations (translation, rotation, scale, skew), yet these operations do not affect the objects that masks are applied to. Masks can be enabled/disabled in any frame of SWF file. Both types of masks can have the shape of primitives (rectangle, ellipse etc.) or complex freeform objects.
Per-frame Control Over Instances
Rio uses per-frame animation, the most common technique of presenting animation, where object properties change from frame to frame. Available properties depend on the object type on every frame.