removeChild using packages

is it possible to use removeChild and removeEventlistener in external .as files?
It rejects these functions in the main as file so I’m curious.
I haven’t tried yet either cause I’m not entirely sure of how I would go about to do this.