I don’t fully understand the advantages/disadvantages between these two methods of typecasting in this example:
for each(var i:DisplayObject in _display)
{
trace(i as Sprite);
trace(Sprite(i));
}
Is there a recommendation around this at all? I’ve always wrapped in Class() like the latter example but as sometimes reads more easily.
For what I understand, the difference is
TypeError.http://archive.darronschall.com/weblog/2006/02/actionscript-3-casting.html