Thas is called 'as' syntax.
It helps type casting operation easily. Let's take a look at this.
var Hojin:String = String(xxx);
// xxx must be an object which seems like String, but no explicit type
// notation as String.
This example is common way to cast type of object. And it's widely spread in other languages like c, c++, etc - I don't have enough experience to develop with other languages except c,c++. so I don't know much about java, c#, etc. these languages might also use normal type casting.
But! ActionScript 3.0 has a incredible way to do that.
var Hojin:String = xxx as String;
There we go~. Isn't that clear? :)
No comments:
Post a Comment