Textfield Plugin
textfield.swf / html5:intern
Version 1.16
for Flash and HTML5
- A plugin for displaying simple html/css formated texts.
- The position and size of the plugin can by adjusted with the standard layer/plugin attributes.
When no size will be set, the default size of 400x300 will be used.
- In the krpano HTML5 Viewer the textfield plugin is directly integrated into the viewer itself.
The internal HTML5 textfield plugin will be automatically used when trying to load a 'textfield.swf' file.
- Note - there is no full html/css support - use it only for small and simple texts!
- html
- css
- Set the css styles for the html text.
- There are two possiblites to set the css style:
- Either directly in the css attribute:
css="text-align:center; color:#FFFFFF; font-family:Arial;"
- Or put the css styles in a <data> xml element and refer to it via data:name:
css="data:cssstyles"
- Note - the Flashplayer supports only a small and limited subset of html and css code!
Don't try using 'real' html/css code here!
Here a link to the offical Flashplayer documentation about the supported CSS elements:
http://help.adobe.com/.../StyleSheet.html
- autoheight
- When set to true then the height of the textfield will be calculated automatically depending on the html content.
- The onautosized event can be used to get informed about size changes.
- The default is false.
- Note - there can be a short delay when the height need to be calculated!
- Note - the vcenter setting can NOT be used together with the autoheight setting!
- vcenter
- Vertically center the text within the given plugin height.
- The setting autoheight need to be set to false for this case.
- The default is false (=no vertical centering).
- Tip - for horizontal centering use the css style 'text-align:center;'
- Note - the autoheight setting can NOT be used together with the vcenter setting!
- background
- Draw a background behind the textfield.
- The default is true.
- backgroundcolor
- The color of the textfield background.
- The default is 0xFFFFFF (=White).
- backgroundalpha
- The alpha transparency of the textfield background.
- The default is 1.0.
- border
- Draw a border around the textfield.
- The default is false.
- bordercolor
- The color of the textfield border.
- The default is 0x000000 (=Black).
- borderalpha
- The alpha transparency of the textfield border.
- The default is 1.0.
- borderwidth
- The line-width of the textfield border.
- The default is 1.0.
- roundedge
- Make the textfield edges round.
- The value defines the size of the rounded edges.
- The default is 0.0.
- shadow
- Put a shadow behind the textfield.
- The value defines the distance of the shadow.
- The value 0.0 disables the shadow. For a 'centered shadow' or 'glowing effects' use very small values like 0.01.
- The default is 0.0 (=no shadow).
- shadowrange
- The blurring range of the shadow.
- The default is 4.0.
- shadowangle
- The angle of the shadow in degrees.
- The default is 45.
- shadowcolor / shadowalpha
- The color and alpha transparency of the shadow.
- The defaults are 0x000000 (=Black) and 1.0.
- textshadow
- Put a shadow behind the text itself.
- The value defines the distance of the shadow.
- The value 0.0 disables the shadow. For a 'centered shadow' or 'glowing effects' use very small values like 0.01.
- The default is 0.0 (=no shadow).
- textshadowrange
- The blurring range of the text-shadow.
- The default is 4.0.
- textshadowangle
- The angle of the text-shadow in degrees.
- The default is 45.
- textshadowcolor / textshadowalpha
- The color and alpha transparency of the text-shadow.
- The defaults are 0x000000 (=Black) and 1.0.
- onautosized
- This event will be called when autoheight=true is set and the size of the plugin has changed.
- Note - due the automatic word-breaking, there can be more than one onautosized event when the width or the html content will be changed.
- Note - when creating a textfield plugin element dynamically by actions (addplugin, ...),
then the onautosized event should be set before setting the html value to avoid missing the
first call of it.