Textinput.maxhposition - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

TextInput.maxHPosition

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
textInputInstance.maxHPosition
Description
Read-only property; the value of
visible when the pointer has been moved to the very right of the text. It's not the last
character's pixel position. Rather, it's the pixel position all the way to the right of the last
character in the TextInput field. The default value is 0.
You must first drag a TextInput component to the Stage and give it an instance name of
; then add the following code to Frame 1.
my_ti
Example
The following code creates a listener for a change event on the TextInput instance called
. When the change event occurs, the listener displays the current
my_ti
values for each character that the user enters:
maxHPosition
/**
Requires:
- TextInput instance on Stage (instance name: my_ti)
*/
var my_ti:mx.controls.TextInput;
// Create listener object.
var tiListener:Object = new Object();
tiListener.change = function(evt_obj:Object) {
trace("hPosition: " + my_ti.hPosition + " of " + my_ti.maxHPosition);
};
// Add listener.
my_ti.addEventListener("change", tiListener);
is the pixel position of the character that is
maxHPosition
and
hPosition
TextInput.maxHPosition
1227

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents