added some comments in actionscirpt code