Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
:Vector.<String> not working when getting information with JSON from php file. I think my issue might be with the variable "something", tried a few hours with different ways. Nothing working so far.
Okay, so I am trying to implement Database.
This is the new code with the new bgmList,
var json:URLLoader = new URLLoader();
var parsedJSONData:Object;
json = new URLLoader();
json.addEventListener(Event.COMPLETE, parseJSON);
json.load(new URLRequest("http://blogglista.no/TESTESTDBDBDBDBD/check_media.php"));
trace("Loading JSON file...");
function parseJSON(evt:Event):void {
trace("JSON file loaded successfully!");
trace("Parsing JSON...");
trace("RESULTS:");
parsedJSONData = JSON.parse(json.data)
//trace(parsedJSONData.streams[0])
var i=0;
var something:String="";
for (i=0;i<3;i++){
something +=parsedJSONData.streams+ ","
;
}
something= something.substring( 0, something.length - 1 );
var bgmList:Vector.<String> = new <String>
[
something
];
trace(bgmList);
This is the old and working bgmList:
var bgmList:Vector.<String> = new <String>
[
"http://lyd.nrk.no/nrk_radio_p1_ostlandssendingen_mp3_h", //sound0 NRK P1
"http://stream.p4.no/p4_mp3_mq",//sound1 P4
];
trace(bgmList);
I get excact same when tracing both:
But I get an error with the new code,
Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
at Function/AdmobRadiotest_fla:MainTimeline/parseJSON/AdmobRadiotest_fla:playSound()[AdmobRadiotest_fla.MainTimeline::frame1:172]
at Function/AdmobRadiotest_fla:MainTimeline/parseJSON/AdmobRadiotest_fla:changeSound()[AdmobRadiotest_fla.MainTimeline::frame1:144]
at Function/AdmobRadiotest_fla:MainTimeline/parseJSON/AdmobRadiotest_fla:onMouse()[AdmobRadiotest_fla.MainTimeline::frame1:118]
All frames refering to bgmList in some way ![]()
