Subscribe to RSS
get email updates
home | about | pixDif AIR app | video tutorials
polyGeek.com

place your ad here

Web Premium



Get Qwest High Speed Internet



Error (#2148) Loading XML with Flex2

January 11th, 2007 . by polyGeek

I was running through a simple tutorial for loading XML into Flex and displaying it in a DataGrid when I got the following error:

[RPC Fault faultString="Error #2148: SWF file file:///C:/Documents and Settings/.../My Documents/xmlParsing/bin/xmlParsing.swf cannot access local resource Blades.xml. Only local-with-filesystem and trusted local SWF files may access local resources." faultCode="InvokeFailed" faultDetail="null"]

If I go into the bin folder and launch the SWF directly then everything loads and works correctly. That right off is a tip that it’s probably a security issue. Sure enough. With a little research I found it.

  • In the Navigator panel Right-click and select Properties
  • In the lefNav select Flex Compiler
  • In the Additional compiler arguments: field add the following argument: -use-network=false

So my arguments read: -locale en_US -use-network=false

It would seem that this setting has to be made for each project.

Stupid security settings. :-)

When I Googled this problem I only got three hits back. My guess is that this will be a common problem so it wouldn’t hurt for others to duplicate this solution to make it easier for others to find.

Aside: I had to create the Flex category to for this post. Nice to start things off with a fraking error.

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

12 Responses to “Error (#2148) Loading XML with Flex2”


comment number 1 by: Derek Vadneau

It’s odd that Adobe decided not to give this option a place in the IDE settings. It’s a compiler option so you can at least add it yourself, but why not add a dropdown or other control? It’s obviously their intent to make you have to opt-in to local-access, but not having a UI element for it seems a little harsh.

I would suggest making a feature request for this.

comment number 2 by: polyGeek

@Derek – true. Or if we could automatically apply it to all projects or something. Then again, maybe you can do that and I just haven’t figured it out yet. I’m still learning the Eclipse IDE.


[...] Posted on January 11th, 2007 by polyGeek [...]


[...] now I’m trying to load local XML and I find this… polyGeek.com » Blog Archive » Error (#2148) Loading XML with Flex2. I like the fact that polyGeek’s first Flex post is about and error, and my first is [...]

comment number 5 by: Carter Thompson

Yep, this one just bit me too. Interestingly enough, I had another project that I was using the network to access XML content and everything was fine, so this was a little misleading/confusing.

comment number 6 by: polyGeek

@Carter, Yeah, I’ve done other projects that involved loading XML and didn’t add any arguments to the compiler and it worked just fine.

I would bother to understand why if it mattered. :-)

I’m glad this helped out.

comment number 7 by: Jan Jansen

these arguments, eg: -locale en_US -use-network=false

worked for me! :)

Thanks


[...] Posted on January 11th, 2007 by polyGeek [...]

comment number 9 by: Phanindra

Thanks a lot
Worked like magic :)
God bless you

comment number 10 by: Thomas

thank you friend…
it works..!


[...] Posted on January 11th, 2007 by polyGeek [...]

comment number 12 by: Mike

Thanks very much for posting that! It saved me a lot of time.

   Welcome back (Change)

Leave a Reply

comment feed RSS   subscribe to this comment thread

Recent Posts

   



polyGeek.com

© Copyright 2008 polyGeek.com / Dan Florio, All Rights Reserved Except Where Explicitly Stated
Web Developement Blogs - Blog Catalog Blog Directory
M2 Websites
Local Directory for Los Angeles, CA

Better Tag Cloud