Can't access listener object from ActionScript file?

Hi Guys,

Trying to access a listener that I have created in a .as file from within a .fla file. My chapters.as class is as follows:



// Define Chapters
class Actions.chapters {
    
    // Constructor function that is called from external swf file
    public function chapters() {
        
        var broadcaster:Object = new Object();
    
        AsBroadcaster.initialize(broadcaster);
        
        var listener:Object = new Object(); 
        
        listener.chapterChange = function() {
            trace("Chapter Changed");
        }
        
        broadcaster.addListener(listener);
        
    }

}


In my FLA, I have this:



// Import chapters
import Actions.chapters;

// create an instance of the Chapters
var chapterInstance:chapters = new chapters();

var _currentlabel = "startup";
_level0.broadcaster.broadcastMessage("chapterChange");


Now I was expecting my broadcastMessage to appear via trace, but it doesn’t do a thing.

Any ideas on how I can access this properly or do I have to define the listener object within the .FLA file? Cheers, Chris