I am trying to do a drag and drop learning game, but the hittest is not working.

The graphics of the airplane (ap), the train (tn), and the covered wagon (cw) are supposed to be dragged to the timeline and then if the correct year is chosen, it should drop the graphic there. I keep getting the TypeError: Error #1009: Cannot access a property or method of a null object reference. I believe the checkTarget function is not working properly.

The timeline with the year is done with the line tool and the year is text. I then selected a portion of the timeline and converted it to a symbol with the instance name i.e. ttn_mc (target train movieclip). Is it possible the movieclip needs a larger "surface area" to click? or that the surface area needs to be the same or larger as the item that is be dropped?

The target movieclips themselves are not generated by an addChild, I just created them on the timeline with instance names. I have no linkage set up on each of the 3 targets and the instance names are not set up as variables in the .as files. I have 2 .as files: DragGame.as and DragDrop.as. The Document Class is DragGame.

The airplane, train, and covered wagon graphics are movieclips and added twice to the stage, once via manually dragged from library and once via the addChild method. None of them have instance names. The linkage is set up so that , for example, the train (TN) has a class of TN and the base class is DragDrop. Is it possible the target movieclips need to be added via addChild for them to be recognized in playback?

The target is being called by its instance name on the stage. But the program is not recognizing it. Could it be that I need i.e. "parent.ttn_mc" to go from one movie clip to another all on the same frame?

Also I do have an animation running for the first 600 frames. Then it stops to have this interaction with the user. So this code needs to work further down the timeline, not on frame 1...which is what I have seen other examples of drag/drop do.

The trace in the checkTarget function in DragGame.as does not show up in my output window.

Thanks in advance.