Edit an especific string into a dynamic textbox
Hello guys! Long time.
I'm creating this "Phone Contacts Numbers Saving Tool" for people who constantly losing their phone contacts numbers. I achieved making 2 dynamic textboxes "Name" "Number" so you put your name and number, then a button to "Create Contact". Then that info is saved into 2 dynamic textboxes columns, one is for Names and the other for Numbers. This is the script:
Code:
var saveState2:SharedObject = SharedObject.getLocal("cookie2");
if(saveState2.data.Names==undefined && saveState2.data.Numbers==undefined ){
}
else {
Names.text =saveState2.data.Names;
Numbers.text = saveState2.data.Numbers;
}
btn.onPress=function(){
Names.text += name1.text
Numbers.text += number1.text
saveState2.data.Names=Names.text;
saveState2.data.Numbers=Numbers.text;
}
btn2.onPress=function(){
saveState2.clear();
Numbers.text=""
Names.text=""
}
stop();
I want to be able to "edit" or "delete" an specific contact/number from the list. Every time you click the "create contact button" it adds the name and the number with
Code:
Names.text += name1.text
Numbers.text += number1.text
Ideas? Thanks