Error when using "dispatchEvent()"

G’day all,

I am trying to use “dispatchEvent()” to create a custom event that I have a listener listening out for, and I call out the event as follows:

dispatchEvent(new Event="End");

This returns the following error:

1105: Target of assignment must be a reference value.

How do I go about using this?