Flash Lite 2 |
|||
| Flash Lite 2.x ActionScript 언어 참조 설명서 > ActionScript 클래스 > Boolean > toString(Boolean.toString 메서드) | |||
public toString() : 문자열
Boolean 객체의 문자열 표현("true" 또는 "false")을 반환합니다.
지원 버전: ActionScript 1.0, Flash Lite 2.0
String - 문자열 "true" 또는 "false"입니다.
이 예제에서는 Boolean 유형의 변수를 만든 후 toString()을 사용하여 해당 값을 trace 문에 사용할 문자열로 변환합니다.
var myBool:Boolean = true;
trace("The value of the Boolean myBool is: " + myBool.toString());
myBool = false;
trace("The value of the Boolean myBool is: " + myBool.toString());