Hello I’ve started to learning AS3 from one book and found something I don’t understand.
Ellipse(_board[row][column]).fill = getFill(row, column);
_boardis two dimensional array ofEllipsetype, so I just dont understand why isEllipse(Ellipse object)used when it apparently works without it, or I haven’t seen any changes when I omitted it.
Ellipse(_board[row][column])is a type castType(object)Because you can push anything into an
Arraythe compiler doesn’t know what kind of objects are stored within theArray. So it is good style to cast objects if you retrive them from anArrayto their correct type.This has several benefits: