xml 로딩 시 각 노드의 변수형
외부의 XML을 로딩하여 nodeValue의 값을 변수로 정할 경우
해당 값은 기본적으로 String의 변수형을 가집니다.
Flash MX 2004의 기본 컴포넌트인 XML Connector의 경우 정상적으로 정수형으로 불러올 수 있습니다만 . . . 자세한 사용법을 모르겠더군요.
아무튼, 이때 Number();를 이용할 경우 해당 변수값을 정수형으로 변경할 수 있습니다.
이 함수는 전역합수입니다. 자세한 내용은 다음과 같습니다.
Number()
Availability
Flash Player 4; behavior changed in Flash Player 7.
Usage
Number(expression)
Parameters
expression An expression to convert to a number.
Returns
A number or NaN.
Description
Function; converts the parameter expression to a number and returns a value as follows:
If expression is a number, the return value is expression.
If expression is a Boolean value, the return value is 1 if expression is true, 0 if expression is false.
If expression is a string, the function attempts to parse expression as a decimal number with an optional trailing exponent, that is, 1.57505e-3.
If expression is undefined, the return value is as follows:
In files published for Flash Player 6 or earlier, the result is 0.
In files published for Flash Player 7 or later, the result is NaN.
This function is used to convert Flash 4 files containing deprecated operators that are imported into the Flash 5 or later authoring environment. For more information, see & (bitwise AND operator).
See also
NaN, Number class
About this entry
You’re currently reading “xml 로딩 시 각 노드의 변수형,” an entry on multiplicité
- Published:
- Monday, October 20th, 2003 at 10:21 pm
- This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Korea.
- Author:
- vizualizer
- Category:
- techne
No comments
Jump to comment form | comments rss