Is there a way, in AS3, to check whether or not a variable is defined?
Thanks.
The School
AS3 Question
Re: AS3 Question
If the variable is a number, then you know it hasn't been defined if it's value is NaN.
For numbers we use the function isNaN, it returns a Boolean.
For other objects like strings, movieclips, sprites, and I think everything else, it will be null if it's undefined.
| Code: |
|
For numbers we use the function isNaN, it returns a Boolean.
For other objects like strings, movieclips, sprites, and I think everything else, it will be null if it's undefined.
| Code: |
|
Bestrafe mich.
Du darfst mein Bestrafer sein!
Der Herrgott nimmt.
Der Herrgott gibt.
Du darfst mein Bestrafer sein!
Der Herrgott nimmt.
Der Herrgott gibt.