Reply
- Web page addresses and e-mail addresses turn into links automatically.
- Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
- Lines and paragraphs break automatically.
|
||||||
|
||||||
| © Touchwood Creative 2007 | We use Firefox |
Can I append recoeds to an XML file?
Based on your codes, I try to append codes to an XML file,but it shows"Error #1009: Cannot access a property or method of a null object reference.",
Could you please have a look?
=============================================================
private function appendXML():void{
myButtonInfo.buttonID=BtnID.text;
myButtonInfo.xPosition=xPos.text;
myButtonInfo.yPosition=yPos.text;
myButtonInfo.bWidth=bW.text;
myButtonInfo.bHeight=bH.text;
myButtonInfo.action=bA.text;
var newXMLStr:String="<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+myButtonInfo.toXMLString();
var fs:FileStream=new FileStream();
fs.open(file,FileMode.APPEND);
fs.writeUTFBytes(newXMLStr);
fs.close();
}