简体   繁体   中英

Flash as2 using xml from dropbox and saving data via xml

I have been googling the crap out of this, and can't seem to find the answer. What I want is my flash to access a xml file on my dropbox account. Problem is I keep getting "Error opening URL...". I am new to using XML in as2, so all I have is this snipet of tutorial code:

var myXML:XML = new XML();
myXML.ignoreWhite=true;
myXML.load("https://dl.dropboxusercontent.com/u/30169277/onlinesaves/test.xml");
myXML.onLoad = function(success) {
if (success) {
var myImage = myXML.firstChild.childNodes;
for (i=0; i<myImage.length; i++) {
var imageNumber = i+1;
var imageName = myImage[i].attributes.title;
var imageURL = myImage[i].firstChild.nodeValue;
trace ("My image number "+imageNumber+" is titled "+imageName+" and its URL is "+imageURL+".")
}
}
};

I understand for security reasons that flash can only acces what is on the desktop, or same source folder for that matter, but I've seen it done before. And I know flash is attempting to open it, because every time I export, my dropbox lets me know 2 files had changed (the xml and the image).

So, I'd like to know how to get that fixed, and when fixed, how would I save flash data via the xml file to my drop box. Responses are much aprreciated.

The Dropbox API does not support ActionScript 2 . In general, use the following process:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM