EasyManua.ls Logo

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

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1074 ActionScript classes
// 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
null.
Availability: ActionScript 1.0; Flash Player 5 - Instance names for buttons and text fields
work in Flash Player 6 and later.
Returns
String - A string or null.

Table of Contents

Related product manuals