Hi all. I need to connect to internet from local file. when I try, I get warning about trying to connect to internet and the when I hit ‘OK’, I get error:
SecurityError: Error #2028: Local-with-filesystem SWF file file:///D|/Flash/proj2/game.swf cannot access Internet URL http://localhost/flash/proj1/upload_score.php.
at flash.net::URLStream/load()
at flash.net::URLLoader/load()
at game_fla::MainTimeline/frame2()
at flash.display::MovieClip/gotoAndStop()
at game_fla::MainTimeline/checkmyhit()
at game_fla::MainTimeline/moveChar()
All I try is to connect to localhost with URLLoader and get data from there. here is my code:
var rqst:URLRequest = new URLRequest('http://localhost/flash/proj1/upload_score.php');
var ldr:URLLoader = new URLLoader();
ldr.addEventListener(Event.COMPLETE, cmplloading);
ldr.load(rqst);
function cmplloading(e:Event) {
trace(ldr.data);
}
Is there any way to connect to Internet from local? If I upload this page on web, it works fine but I need local connection.