com.Utils.Text

Summary
com.Utils.Text
Functions
GetTextExtentMethod that tries to mimic the getTextExtent method in the TextFormat class, for now it only returns an object with the width and height property set
AddThousandsSeparatorThis method returns a string of formatted numbers with commas inserted in the thousands place for readability.

Functions

GetTextExtent

public static function GetTextExtent(text: String,
format: TextFormat,
context: MovieClip) : Object

Method that tries to mimic the getTextExtent method in the TextFormat class, for now it only returns an object with the width and height property set

Parameters

text:String - the knubot string or any other string
format:TextFormat - the textformat to use when getting the text extent
context:MovieClip - the context to create the textfield in, useful to get the textformat

Returns

Object - an object with the property, width and height set

AddThousandsSeparator

public static function AddThousandsSeparator(inputNum: Number) : String

This method returns a string of formatted numbers with commas inserted in the thousands place for readability.

public static function GetTextExtent(text: String,
format: TextFormat,
context: MovieClip) : Object
Method that tries to mimic the getTextExtent method in the TextFormat class, for now it only returns an object with the width and height property set
public static function AddThousandsSeparator(inputNum: Number) : String
This method returns a string of formatted numbers with commas inserted in the thousands place for readability.
Close