# Pasted flash help example not working

**URL:** <https://forum.kirupa.com/t/pasted-flash-help-example-not-working/172960>\
**Category:** Uncategorized\
**Created:** [December 19, 2005, 10:28pm UTC](https://forum.kirupa.com/t/pasted-flash-help-example-not-working/172960 "2005-12-19T22:28:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dragonfly](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dragonfly](https://forum.kirupa.com/u/dragonfly)\
**Post date:** [December 19, 2005, 10:28pm UTC](https://forum.kirupa.com/t/pasted-flash-help-example-not-working/172960/1 "2005-12-19T22:28:41Z")

</div>

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

```auto

/**
 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:

```auto
**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?
