header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Rohit
Points:160
Posts:0

7/24/2011 12:28:52 AM

Title: Error #2044: Unhandled ioError:



import com.adobe.serialization.json.JSON;

import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
import flash.net.URLVariables;

var message:Array = new Array ();
message.push({"franchiseeSessionKey " : "338165FC-6ED0-7B5D-303F-1F7F55EA49F1"});
trace(message);

var vars: URLVariables = new URLVariables();
vars.data   = JSON.encode(message);
trace(vars.data)

var req: URLRequest = new URLRequest();
req.method = URLRequestMethod.POST;
req.data = vars;
req.url = "http://localhost:8080/ail/api/category-flash";

var ldr:URLLoader = new URLLoader();
ldr.addEventListener(Event.COMPLETE, handleServerResponse);
ldr.load(req);

function handleServerResponse(event:Event):void
{
	//trace(event.target.data);
}





This things client has provided me


servar url::
http://173.230.129.197:8080/ail/api/category-flash

local url:
http://localhost:8080/ail/api/category-flash

method post()

json:: input
{
  "franchiseeSessionKey": "338165FC-6ED0-7B5D-303F-1F7F55EA49F1"

}



1
bob_senior
Points: 1320
Posts:0
7/24/2011 6:40:35 AM



the url you are trying to load is not accessible which throws IO error. You can catch this error by attaching the error handler to your URLLoader.

Use the below code to see whats your error.


	
//io error handler
ldr.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);

// handler function
function ioErrorHandler(e:IOErrorEvent):void {

trace('error: '+e);
}


2
Rayan
Points: 700
Posts:0
7/24/2011 7:21:28 AM



your URL may not be accessible due to different domain. Try using the crossdomain.xml in the root of website whose URL you are trying to access.


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 6+4 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions