This content has been marked as final. Show 11 replies
Your problem is most likely a security issue. By default, your SWF is allowed to access services only from the server from which it was served. In order to access an outside service, the outside server must have a crossdomain policy file allowing the access. Macromedia's servers have policy files allowing access from anywhere. Look in the docs about crossdomain files for more info.
What about local files? Let's say i have C:\DocumentsAndSettings\Project\app.mxml directory. I want to read file from within Project dir. I tryed many difrent combinations with url and crosspolicity...
within(Project ) url = "myfile.xml" cross policity in C:\ , C:\Project and in app's dir. even in "bin" and it doean't work.
Ps. inlineblue ;) thx for help.. http://weblogs.macromedia.com/crossdomain.xml ;) now i know why i had possibility to load this file. ;)
I have the same question: WHAT ABOUT LOCAL FILES????
I have XML files in subdirectory /xml and I can't load them:
[RPC Fault faultString="Error #2028: Local untrusted file xml/sprzedaz.xml may not access Internet URL file:///c:/Documents and Settings/agnieszka/My Documents/Flex Builder 2.0/wookWykresy/bin/wookWykresy.swf." faultCode="InvokeFailed" faultDetail="null"]
<mx:HTTPService id="srv" url="./data/stones.xml" useProxy="false" result="resultHandler(event)" showBusyCursor="true"/>
I use a local relative file reference for local xml. When I serve the application on the web I make sure that the reletive path is valid on the server as well.
Hmm.. i don't get one thing... Do i need server on my PC? I want to simply launch file from directory :
C:\Document... \myApp.html i guess Flex doesn't support Windows dir style? I tryed 100s of combinations with path...
I need simple movie browser with xml list of files. It must work without any servers...
I use a local relative file reference for local xml as well...
( serwis.url = "./xml/foodcost.xml"; )
But I get the error...
You should probably make sure you have a crossdomain file setup in the root of your web server if you are running a served application, if you are running locally (launching from FB) then you shouldn't have a problem.
<?xml version="1.0" encoding="iso-8859-1" ?>
<allow-access-from domain="*" />
1. I do have CrossDomain xml file with "*" in all directories.
2. I have problem with lounching from FB .
The only thing I can think of might be a naming collision. Try renaming your 'xml' folder (and your references to it) to something like 'data' or 'assets'. I'm using local xml just like in the felxstore example. Maybe your xml is not well formed. I think the outline tool in FB might give you a visual check. If you post a sample of your xml, that might help.
I think we both with Agnieszka have polish OS ;)
I have XP PRO PL. maybe there is problem with multibyte chars.... I tryed to launch it even from C:\App\ ;)
I have the same problem with macromedia's sample Flex Store
I use "Windows XP SP2 PL / Fire Fox 1.5 PL / FLEX 2 Beta 3 / FLASH PLAYER 9"
on IE 6/7 the same...
:| i guess it must have a bug. I can load XML via HTTPService only from HTTP://
Maybe it's becouse FireFox changes url on the :
i tryed file://C:/App/ too....
i give up.. :| there must be something wrong with that.... i got only one day do write player :| Flex sux for now.. :/ Time to launch Apatche & PHP5