moBlog Flash
- Started
- Last post
- 26 Responses
- JamesEngage
I'm currently writing a little app that will read in the XML from an moBlog site where I send my photos from my mobile... it works perfectly on my box, but when i uplaod the flash ifle to my server the files don't load in... Is this because I'm trying to fetch in an image that is held on a different domain...
If so... how do I get around this?
- UndoUndo0
it my due to the new flash security features that restrict cross domain loading.look up "allowing cross-domain data loading" in the help section of flash
- JamesEngage0
yes it is... will have to find a work around
- Neuarmy0
sounds pretty sweet james...
would love to know how you make out.
- toastie0
i had the same problem when i was reading the earthquake data from an external weather site, all you need is a perl or php script that just reads in the xml and then outputs it, then read in the script from flash. In php it's just one line using readline() and it goes like this
readfile ('fileURL');
- jpowell0
neuarmy, you want to make out with james?
j/k
- Neuarmy0
hahahha, that's really funny...
didn't realize it would read like that... i heard he's the haute™ tho...
- JamesEngage0
I need ot import jpegs from another namely the flickr server... that is what is causing the problem I think
- JamesEngage0
ah actually it is not the images but the actual xml to start with... will keep you post...
the haute!
- toastie0
reeaaaaad fiiiiilleee
reeeeaaaaaaddd fiiiileeeeee
- CISNKY0
To load an xml document that is loaded on a different domain from the root swf, you need a crossdomain policy xml file. This needs to be placed in the root folder of the server where the xml file is hosted.
Had a similar problem when the client wanted to keep the content on a different server to the application.
- toastie0
that seems like more of a pain in the ass than a one line php script.
- CISNKY0
crossdomain.xml policy file doesn't rely serverside scripting.
- JamesEngage0
readfile or readline? which is it?
- toastie0
readfile
- JamesEngage0
when t reads it in it is parsing tag signs as > etc.... how do i get around that?
- unfittoprint0
use CDATA (character data) tags inside the XML node.
http://www.w3schools.com/xml/xml…
- JamesEngage0
I'm trying to parse a XML page that I have no control over...
- tparsons0
It sounds like a security issue with communication between the 2 servers. Drop this code with your URL's along with different combos and the IP address of you domain and the one you're pulling from.
Filename should be crossdomain.xml in the main www folder.
Hopefully the code shows up below this line.
_________________________
- tparsons0
It didn't work. If you want an example email me.
- unfittoprint0
flash7 security measures regarding cross domain loading:
http://www.macromedia.com/suppor…