# AS2: "no method with the name 'broadcastMessage'"

**URL:** <https://forum.kirupa.com/t/as2-no-method-with-the-name-broadcastmessage/193415>\
**Category:** flash\
**Created:** [July 13, 2006, 5:36am UTC](https://forum.kirupa.com/t/as2-no-method-with-the-name-broadcastmessage/193415 "2006-07-13T05:36:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![angusf](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@angusf](https://forum.kirupa.com/u/angusf)\
**Post date:** [July 13, 2006, 5:36am UTC](https://forum.kirupa.com/t/as2-no-method-with-the-name-broadcastmessage/193415/1 "2006-07-13T05:36:06Z")

</div>

Why does this external class file not compile? I want it to be able to broadcast events to listeners but using “AsBroadcaster.[COLOR=#000080]initialize[/COLOR]COLOR=#000000[/COLOR];” in the constructor does not seem to be enough. Any suggestions?

[AS]  
class QueLoader{  
private var mcLoader:MovieClipLoader;  
private var qlListener:Object;  
private var qlItemsLoadingArray:Array;  
private var qlTargetMCArray:Array;  
private var qlCurrentLoading:Number;

```
function QueLoader(){
    qlCurrentLoading = 0;
    qlItemsLoadingArray = new Array();
    qlTargetMCArray = new Array();

    mcLoader = new MovieClipLoader();
    
    qlListener = new Object();
    //Do when Item begins loading
    qlListener.onLoadStart = function(target:MovieClip){
        
    };
    //Do when item loading progresses
    qlListener.onLoadProgress = function(target:MovieClip, bLoaded:Number, bTotal:Number){
        
    };
    //Do when item loading complete
    qlListener.onLoadComplete = function(target:MovieClip, httpStatus:Number){
        
    };
    //Do when item loading error
    qlListener.onLoadError = function(target:MovieClip, errorCode:Number, httpStatus:Number){
        
    };
    mcLoader.addListener(qlListener);
    
    //This que should be able to broadcast events
    AsBroadcaster.initialize(this); 
}

public function addToQue(item){
    
}

public function removeFromQue(item){
    //If que is now empty
    this.broadcastMessage("queEmpty");
}

public function pauseQue(item){
    this.broadcastMessage("quePaused");
}

public function resumeQue(item){
    this.broadcastMessage("queResumed");
}

public function getTotalBytesInQue(){
}

```

}  
[/AS]
