This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var textRestrict:spark.components.TextInput; | |
textRestrict.restrict = "0-9," //Numbers and comma only | |
/********************************************************* | |
textRestrict.maxChars = 5; | |
textRestrict.restrict = "a-zA-Z0-9"; //Alpha-numeric only | |
textRestrict.restrict = "0-9"; //Numbers only | |
textRestrict.restrict = "^a-z"; //All chars, only uppercase alpha | |
textRestrict.restrict = "\u0020-\u007E"; //ASCII chars 32 (space) through 126 (tilde) only | |
textRestrict.restrict = "^\^\-"; //All chars but not the caret or hyphen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function GetSelectedObjectID():String | |
{ | |
var objectId:String = ""; | |
if(InDesign.app.selection[0] != null) | |
{ | |
if(InDesign.app.activeDocument.selection[0] is TextFrame) | |
{ | |
var textObject:TextFrame = InDesign.app.selection[0]; | |
objectId = textObject.id.toString(); | |
} |