Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Easiest setup for local testing of HTTPService

Avatar

Avatar
Level 1
johnnyleitrim
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
johnnyleitrim
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
johnnyleitrim
Level 1

01-11-2008

I have written a simple webapp and am running it on
http://localhost:8080/myApp
and I'm using an HTTPService to retrieve information:





var httpService:HTTPService = new HTTPService();

httpService.addEventListener(ResultEvent.RESULT,
httpResult);

httpService.addEventListener(FaultEvent.FAULT, httpFault);

httpService.url = "
http://localhost:8080/myApp";

httpService.resultFormat = "xml";

httpService.send();





I compile the swf, and then open the swf file in my browser
with the url:



file:///home/me/workspace/myFlexApp/myFlexApp.swf



I get a "Security error accessing url", since I am going
"across domains". I tried using file://localhost/home... but that
did not help.



I'm wondering what is the easiest way to get this working?
Since this is primarily just for testing the SWF during
development, I didn't want to have to create a crossdomain.xml or
have to copy the swf file to the test webservers root, or setup a
proxy.



I'm hoping there might be some "disable security" feature I
could set in my flash player or during compilation of the swf file
that would allow this to work without extra overhead.



Thanks,

John.



PS. I see there is a message that says: "Please use "Attach
Code" to include any sample code in the message". I'm uding FF3,
and I couldn't find ant "Attach Code" option