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:
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?