ok, first you have to pass your xml to flash
this tutorial can tell you how: http://www.kirupa.com/developer/actionscript/xmldataflash.htm
then, the path you will use to get your link data cuold be:
yourURL = yourXML.firstChild.childNodes[0].lastChild.firstChild.nodevalue;
then, put in a button:
on(release){
getURL(yourURL);
}
in the root timeline of the main movie, on the same frame number that the button resides, put this code:
myXml = new XML();
myXml.onLoad = function(success){
if(success){
_root.myUrl = this.firstChild.childNodes[0].lastChild.firstChild.nodevalue;
// whatever other node values you wish to bind can be put here
//or you could redirect to another function to handle it
}
}
One last problem that I have is that I need the data file to be called destaques**.php** instead of destaques**.xml** for the data base to recognize it but when I change it in the AS aswell as in the** XML file name** the flash movie seems to have trouble reading it. I have tested it locally and it works fine, but when online… doesn’t
you cannot rename your xml file name to a php extension without the file actually being a php file. You must create a php file that posts (a string containing your xml) back to your flash file. Then you can specify xmlobj.load(myxmldata.php)…
you cannot rename your xml file name to a php extension without the file actually being a php file. You must create a php file that posts (a string containing your xml) back to your flash file. Then you can specify xmlobj.load(myxmldata.php)…
offline, flash attempts to read loaded files as text. online your server is treating the file like a php file due to the extension…it expects a php declaration within your file…