A lot of questions

  1. How would i check if a object can see another object?
    Desc:- this is for a tds game. and i need it so that if player is within a certain range from enemy and no other obstacle is between them, then enemy should chase player. The problem is the checking if a obstacle is in between part. I dont think using points and hitTest will be a good idea, cause of processing requirement, so what alternative do i have? Also is it possible to give all obstacles a general name or parent to refer-by/ it might make the distance calculation easy.

2)how do i find the number of instances of an object currently on stage? I can use a counter variable to keep track, but is there anyother way? and is it possible to get the name of a instance at a particular position?

3)This might sound silly and simple to you, but i cant figure it out. If i make instances of a mc in code, i can assign it a name and keep track of it, but what if i have to place the instances manually from the library?how do i check against them, say for collision, without giving them an individual instance name?

4)suppose i have a movieclip, and there are 2 mc inside it and then again there are 2 mc under each of those two mc. Now how do i refer to one of that sub-sub-mc in code? and if i duplicate the main mc instance, how will those sub mc be available to me?

5)Can you guys give me some good tutorials on modifying a swf? i mean say, i write something or put a picture in one swf, and that text/graphics being loaded through another swf? (think it as an external level editor)
also i need tutorial on how to make a swf interact with text/ini files.

(Some questions will be added later, when i get answer to this ones.)