Pasted flash help example not working

I simply pasted the following from Flash’s help and added the progbar and named it just like they said:


/**
 Requires:
  - ProgressBar component on Stage (instance name: my_pb)
*/

System.security.allowDomain("http://www.helpexamples.com");

var my_pb:mx.controls.ProgressBar;

my_pb.mode = "polled";
my_pb.source = "my_sound";

var pbListener:Object = new Object();
pbListener.complete = function(evt_obj:Object) {
 trace("Sound loaded");
}
my_pb.addEventListener("complete", pbListener);

var my_sound:Sound = new Sound();
my_sound.loadSound("http://www.helpexamples.com/flash/sound/disco.mp3", true);

However, this gets printed to the output:

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 13: There is no method with the name 'addEventListener'.
	 my_pb.addEventListener("complete", pbListener);

Why, oh why…?

EDIT: its gets better! …I switched to FPlayer ver 7 instead of 8 in the publishing settings and it works…then I changed back to 8 and it CONTINUED TO WORK?

Does this mean that I need to temporarly switch to FPlayer 7 and then back to 8 every time I use addEventListener in my projects???

Is this a bug? Whats going on?