Custom Events question

Ok, I’ve searched quite a lot but can’t find a fix to my problem. I’m doing quite a complicated game with a lot of code but one thing I can’t quite figure out is how to trigger a function on the main stage from a dynamically added object.I’ve tried using custom events, but it doesn’t work and doesn’t throw any errors either.

Here’s the code for the CustomEvent class:


package
{
	import flash.events.Event;
	
	public class CustomEvent extends flash.events.Event
	{
		public static const CUSTOM:String = "CustomEvent";
		private var command:String;
		var custom:*;
		
		public function CustomEvent(object:Object)
		{
			super(CUSTOM);
			this.custom = object;
		}
	}
}

Here’s the code part in the dynamically added child(CustomEvent is imported):


this.parent.dispatchEvent(new CustomEvent(null));

and here’s the main timeline part of the code:


stage.addEventListener(CustomEvent.CUSTOM, checkMoney);
//more code here
function checkMoney(e:CustomEvent)
{
	trace("money");
}

All of the above seems to work, because it doesn’t throw an error, but it doesn’t trace money when the event is dispatched.Before you ask, the event IS being dispatched or at least the if method it’s in is entered.Any other method to tell the stage it’s time to run the function is welcome also.Thanks all in advance.

P.S. about referencing I’ve tried addEventListener, this.addE… and stage.addE… for the main timeline and dispatchEvent,this.disp… and this.parent.disp… for the class. No combination of these works…