Sight And Light Algorithm in Actonscript3.0