Getfocus (Selection.getfocus Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

// convert the selected text to upper case.
tempString += target.text.substring(beginIndex,
endIndex).toUpperCase();
break;
case 'Lowercase...' :
tempString += target.text.substring(beginIndex,
endIndex).toLowerCase();
break;
}
// append the text after the selected text to the temporary string.
tempString += target.text.slice(endIndex);
// set the text in the target text field to the contents of the temporary
string.
target.text = tempString;
}
}
See the Strings.fla file for the entire script. Typical paths to the ActionScript samples folder
are:
Windows: boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript
Macintosh: Macintosh HD/Applications/Macromedia Flash 8/Samples and Tutorials/
Samples/ActionScript
See also
getBeginIndex (Selection.getBeginIndex method)

getFocus (Selection.getFocus method)

public static getFocus() : String
Returns a string specifying the target path of the object that has focus.
If a TextField object has focus, and the object has an instance name, this method returns
the target path of the TextField object. Otherwise, it returns the TextField's variable name.
If a Button object or button movie clip has focus, this method returns the target path of
the Button object or button movie clip.
If neither a TextField object, Button object, Component instance, nor button movie clip
has focus, this method returns
Availability: ActionScript 1.0; Flash Player 5 - Instance names for buttons and text fields
work in Flash Player 6 and later.
Returns
- A string or
String
1074
ActionScript classes
.
null
.
null

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF