Simple Object Question

I feel really dumb for asking this but…

I have two objects. Car and Gun. They are both in their separate classes and I have a main doc class called Main.

I need to tell Gun that Car is at a specific location x,y so it follows along. Now, I’m able to access the public variables and use Car.getX() and Car.getY() which actually I don’t even need since I can just use .x and .y but I tried both methods work IN the doc class “Main”

When I try the same from the “Gun” class so that I know where Car is I get an error. “Access of undefined property dudeCar”

“dudeCar” is what I called the physical “Car” class movie clip on stage.

So what am I doing wrong? How can I talk between these two separate “Gun” and “Car” classes without using the “Main” doc class?

Thank you in advance for reading and possibly answering.