Documentation for the BGX Tooltip Component (Flash MX 2004) Version 1.1.0   24/7/2004


Overview

Introduction

The BGX Tooltip Component displays a tooltip above assigned objects like buttons, list entries, hotspots etc. It automatically positions the text next to the mouse, adjusting it so that it will not fall outside the boundaries of the stage.

The TextField used to display the tooltip text is accessible to set properties like text styles, html display and others.

back to top

Deployment

After installing the BGX Tooltip Gauge extension the component will be available from the components panel within Flash MX 2004.

back to top

Reference


Using the Bgx Tooltip Component

To use the Bgx Tooltip Component simply drag it from the components panel onto the stage. Normally it should be placed in a layer that is above all other the graphical objects. Even though several instances of the components could be used it is usually enough to use one instance for the whole movie. (If movie clips or movies are dynamically loaded on levels that would cover the tooltip component it may be useful placing instances also in those other timelines etc.)

While working within the FLA file the component is visible as icon. This icon will not be visible once exported to SWF.

Tip

If you store a reference to the component instance in the _root timeline you can easily access it from any other timeline. E.g. in the timeline that contains a component instance called mcTooltip place the following code:

_root.tooltip = mcTooltip;

Regardless which timeline is the _root or if the root changes, because the movie is loaded onto another one, the component instance can be addressed from any location now as _root.tooltip.

reference overview    back to top


Properties

Property Value (defaults in bold) Description
label
String
Default: "Tooltip text"
The text to be displayed.
labelField
TextField
The TextField used in the component. Using this property to access the TextField any common TextField properties like html, borderColor, textColor etc. can be set.
delay

Number
Default: 6

Number of frames for which the display of the tooltip shall be delayed after the showTooltip() function is called.

E.g. if your movie plays back with 12 fps, setting the delay to 6 will result in a delay of 0,5 seconds.
displayTime
Number:
Default: 36

Number of frames for which the tooltip will be displayed.

E.g. if your movie plays back with 12 fps, setting the displayTime to 36 will result in a display of 36 seconds.

html
Boolean:
Default: false

The html property of the TextField to display the tooltip label.

If set to true the label field will apply HTML formatting.

wordWrap
Boolean:
Default: false

Flag signalling whether wordWrap shall be applied or no.

If wordWrap is set to false the component displays a TextField that adjusts automatically to the longest line in the label string.

If set to true a TextField with a width defined by the wrapLength property will be displayed within which long strings are wrapped automatically (also HTML text).

wrapLength
Number > 0
Default: 200

Defines the width of the TextField in pixels if wordWrap is set to true.

 

 

 

reference overview    back to top


Methods

Method Parameters Description
showTooltip()
none
Triggers the display of the tooltip.
hideTooltip() none Hides the tooltip.


Basic Usage Example

A typical usage of the component would be to show some text when the mouse is rolled over an object like a movie clip, button etc. In the following example the object is called clip while the Bgx Tooltip Component instance is called tooltip.

clip.onRollOver = function()
{
    tooltip.label = "Some text to display";
    tooltip.showTooltip();
}


clip.onRollOut = function()
{
    tooltip.hideTooltip();
}

Further examples can be found at http://www.bgxcomponents.com/components/bgx_tooltip/tooltipExamples.htm

reference overview    back to top

© 2004 Bernhard Gaul