2
I wish I knew the difference between using Object(meuobjeto)
and (meuobjeto as Object)
based on the code below:
var mc:MovieClip = new MovieClip(); //Um objeto MovieClip
trace(mc as String); //null
trace(mc as MovieClip); //[object MovieClip]
trace(mc as Number); //null
trace(String(mc)); //[object MovieClip]
trace(MovieClip(mc)); //[object MovieClip]
trace(Number(mc)); //NaN
I always use the operator as
, however, only to show the Intellisense with the functions of my object and make the writing of the code a little easier. But after all, what is the difference between the two? It is right that I use it in this way?