Hello,
I am working on a project and i am attempting to introduce streaming music to reduce load times on the Project. So i searched online and I read about this script for the streaming...
ActionScript Code:
package scripts{
import flash.media.Sound;
import flash.events.Event;
import flash.media.SoundLoaderContext;
import flash.net.URLRequest;
import flash.display.MovieClip;
public class musicStream extends MovieClip {
private var s:Sound = new Sound();
private var req:URLRequest = new URLRequest("music/Soul.mp3");
private var context:SoundLoaderContext = new SoundLoaderContext(8000,true);
public function musicStream() {
try {
s.load(req, context);
} catch (error:SecurityError) {
trace("Loaded")
}
s.play();
//s.addEventListener(Event.SOUND_COMPLETE, repeatMusic);
}
private function repeatMusic(e:Event) {
trace("loaded");
}
}
}
Now the problem
Code:
SecurityError: Error #2000: No active security context.
This is in my output window, and i can't figure it out to save my life. I tried adding the Try/catch method and still nothing. Eventually i want to add a feature for it to repeat, but i cannot do that since it's calling this security error...
Please and thank you...