# Can't play audio file but code seems right and audio file is not missing

**URL:** <https://forum.kirupa.com/t/cant-play-audio-file-but-code-seems-right-and-audio-file-is-not-missing/332654>\
**Category:** flash\
**Created:** [September 10, 2014, 4:37pm UTC](https://forum.kirupa.com/t/cant-play-audio-file-but-code-seems-right-and-audio-file-is-not-missing/332654 "2014-09-10T16:37:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpann](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tpann](https://forum.kirupa.com/u/tpann)\
**Post date:** [September 10, 2014, 4:37pm UTC](https://forum.kirupa.com/t/cant-play-audio-file-but-code-seems-right-and-audio-file-is-not-missing/332654/1 "2014-09-10T16:37:22Z")

</div>

Hello,  
I have a large flash simulator that is supposed to play a sound called sound2.mp3. This file sits in the “audio” folder next to the .fla file. The code that should play the sound is:

```php
package {
     public class UnassignedQueue extends Sprite {
          private var soundURLRequest:URLRequest;
          private var soundNew:Sound;
          public function UnassignedQueue():void {
              ...
              soundURLRequest = new URLRequest("audio/sound2.mp3");
              soundNew = new Sound();
              soundNew.load(soundURLRequest);
          }
          public function playSound():void {
               soundNew.play();
          }
     }
}

```

(Note that all necessary classes are imported.)

This results in “SecurityError: Error #2000: No active security context.” But the sound2.mp3 file does exist in the audio folder.

I have reproduced the code in a simple class using the same folder structure and it works there even though it doesn’t work in this larger project.

Any thoughts on what’s wrong?
