This section describes extensions for HTML in Scaleform.
tag, ALPHA attribute
ALPHA="#xx"
Controls alpha transparency for the text, in the range from 00 to FF (0 to 255). 0 = complete transparency, 255 = complete opaqueness. In combination with COLOR attribute, the ALPHA attribute helps to specify semi-transparent text in HTML.
tag
At the moment, tag in Scaleform may refer only to images imported into the library with assigned linkage identifier. Scaleform does not support loading images from external sources such as Web or file ("http://", "file://" and other protocols are not supported). See section 6.6: Image Substitutions for how to import images and assign the linkage identifier. Here is an example of HTML using the tag to refer to the "myImage" imported image:
t.htmlText = "<p align='right'>abra<img src='myImage' width='20' height='30' align='baseline' vspace='-10'>bed232</p>";
Currently supported attributes for IMG tag:
src - Specifies the linkage identifier for an image symbol in the library. Only images are supported now. This attribute is required; all other attributes are optional. External files (JPEG, GIF, PNG, and SWF files) are not supported yet. User protocol “img://” can be used here instead of embedded image linkage id; the user defined virtual method GFx::ImageCreator:: LoadImage will be called in this case.
width - The width of the image being inserted, in pixels.
height - The height of the image being inserted, in pixels.
align - Specifies the horizontal alignment of the embedded image within the text field. The only supported value for now is baseline.
vspace - For baseline alignment it specifies the offset, in pixels, of the image relatively to baseline. A positive value raises the image above the baseline, and negative lowers the image.
Unsupported attributes:
id - Specifies the name for the movie clip instance (created by Flash Player) that contains the embedded image file, SWF file, or movie clip.
align - "left" and "right". Specifies the horizontal alignment of the embedded image within the text field.
hspace - For "left" and "right" it specifies the amount of horizontal space that surrounds the image where no text appears.
Note, if the image is imported from another SWF file then this image should be used explicitly somewhere in the Flash file to be usable in an IMG tag. If an image is imported but never used then Flash drops out the reference on it completely from the resulting SWF file. One of the ways to prevent this is to create a movie clip, and drag and drop all imported images you need for IMG tags on it. Don't forget to export this movie clip, because if it is also not used explicitly and not exported, then Flash will drop it out from the resulting SWF file.