I am trying to update value of a xml node. below is the code -
<fx:Declarations>
<s:HTTPService id="srv" url="comVars/userInfo.xml"/>
</fx:Declarations>
<fx:Script>
<![CDATA[
import flash.net.*;
public var userInfo:XML;
public var url:URLRequest;
public var loader:URLLoader;
public function skipPwd():void{
url = new URLRequest("comVars/userInfo.xml");
loader = new URLLoader(url);
loader.addEventListener(Event.COMPLETE, skipPwd2);
}
public function skipPwd2(event:Event):void{
if(loader.data){
userInfo = XML(loader.data);
}
userInfo.replace("pwdSet", <pwdSet>Skip</pwdSet>);
}
]]>
</fx:Script>
<s:Button x="642" y="283" label="Skip Pwd" click="skipPwd()"/>
Can someone tell me whats going wrong here? Or i need to approch another way?
Thanks,
Vaibhav
North America
Europe, Middle East and Africa
Asia Pacific