Next | ||
8.1.1 Defining resources
RVML stores all multimedia and font resources externally in resource files. Resources are always contained within a Repository element that is used for grouping and retrieving resources.
8.1.1.1 External Resources
8.1.1.1.1 Images
RVML supports the JPG, GIF and PNG external formats as well as images stored in SWF files. Additional formats may be supported on input if the JAI (Java Advanced Imaging) APIs are on the KineticFusion class path. If your desired image format is not recognised by KineticFusion then the JAI toolkit for Windows, Solaris and Linux can be downloaded from http://java.sun.com/products/java-media/jai/. OS X users can download the Apple implementation of JAI from http://www.apple.com. Once downloaded, all JAI jar files must be added to the class path of the KineticFusion application.
When referencing image resources in RVML the preferred representation is using images stored in SWF format. This can greatly reduce the amount of application processing required to transform images from their native format into the formats used within SWFs.
8.1.1.1.2 Sounds
RVML supports the MP3 external format that is encoded using Constant Bit Rate (CBR) encoding. All other sound format must be pre-encoded as SWF files. Commonly, this is carried out by converting SWFs containing sound symbols to RVML.
When referencing sound resources in RVML the preferred sound representation is using sounds stored in SWF format. This can greatly reduce the amount of application processing required to transform sounds from MP3 format into the format used within SWFs.
8.1.1.1.3 Video
There are several video formats supported by the SWF format. Currently KineticFusion will only accept Video resources that are stored in SWF format. Commonly, this is carried out by converting SWFs containing video symbols to RVML.
8.1.1.1.4 Fonts
Font symbols, due to their potential size and complexity are normally stored as external resources rather than explicitly represented as RVML (though the FontDefinition element permits this - the option to view the contents of fonts is addressed in more detail in the Font Overview section). RVML supports the TrueType external font as well as all fonts stored in SWF format. Commonly, SWF fonts are created by converting SWFs containing font symbols to RVML.
When referencing font resources in RVML the preferred font representation is using font stored in SWF format. This can greatly reduce the amount of application processing required to transform fonts from TrueType format into the native SWF format.
8.1.1.1.4.1 TrueType Fonts
TrueType fonts are the native fonts for many operating systems. While it is possible to reference TrueType fonts directly within RVML, converting TrueType fonts can consume considerable CPU resources. For this reason, it is recommended that all TrueType fonts be converted to SWF format and stored in the System Font Repository where they can be referenced within RVML easily.
For more information on this see the Font Overview section.
8.1.1.2 Resource Repositories
A SWF movie can contain many multimedia elements: video, sounds, images and fonts. RVML uses the concept of a resource repository to store and locate these multimedia components when reading or creating RVML documents. KineticFusion currently supports three different types of repository definitions and these may all be used within a single RVML document.
8.1.1.2.1 File Repository
The repository resides at a specified folder and all resources are stored in predefined folders under the repository folder. E.g. When a repository folder is defined as /myprojects/repository then an image with name myDog.jpg is located at :
/myprojects/repository/images/myDog.jpg
8.1.1.2.2 Absolute File Repository
The repository only acts as a container and all resources defined within this repository must be specified in terms of their absolute location in the filesystem E.g. When the above repository examples could be changed to an Absolute File Repository and the image would have a location specified:
/myprojects/repository/images/myDog.jpg
8.1.1.2.3 URL Repository
The repository only acts as a container and all resources defined within this repository must be specified in terms of their absolute URLs. When the above repository examples could be changed to an URL Repository and the image could have a location specified as:
file:///myprojects/repository/images/myDog.jpg
8.1.1.3 System Font Repository
KineticFusion supports a global font repository, defined by the 'kinesis.repository.systemFontPath' configuration option. By default, this is located under the projects folder in a standard installation. The system font folder is designed to be used as the main repository for TrueType fonts that have been imported using the '-font' command line option, or using the GUI 'Import TTF Font' option. System fonts are used in RVML when no resource location is specified. System fonts are also used as a fallback to supply glyph information for modified text in an RVML document after decompiling.
The system font repository is implemented as a global folder containing all imported system fonts. On installation, this folder is empty but it is populated by importing fonts as specified above. To locate fonts quickly, the folder also contains an XML index file of all fonts called '.config'. This file contains the mapping from font names to their corresponding implementation SWF file. It is possible for a user to add new SWF fonts to the System Font Repository by adding the SWF file to the repository folder and updating the '.config' index file manually. No instances of KineticFusion should be running when this is carried out as any subsequent font importing may result in the modified font index being overwritten.
If the '.config' file is removed or renamed, the '.config' index file is rebuilt automatically by KineticFusion the next time the application is run.
Next |
Copyright 2003-2005 Kinesis Software. All rights reserved.