richie
April 11th, 2003, 08:29 PM
hi
i am learning to work with sharedobjects in flash mx, and i am trying now do to a little application, and in this application i will use a listbox to do some things, i have a message board that will keep the messages in the sharedobject named "visitas", i add data with a function, ,here it is:
function salvaMensagens(){
var num = Number(_root.entradas.text);
visitas.data.mensagens[num] = _root.mensagem.text;
visitas.data.visitantes[num][num] = _root.nome.text;
visitas.data.visitantes[num][num + 1] = _root.email.text;
_root.display.text = visitas.data.mensagens.length;
_root.lista.addItem(_root.nome.text, _root.email.text);
//trace(nome.text + " - " + email.text);
visitas.data.flush();
}
this line:
_root.lista.addItem(_root.nome.text, _root.email.text);
it had to add the name digited in the input text field name, and the same with the email, respectivelly , label and data, but my listbox is still empty after several tryes..
please, could someone help?
i am learning to work with sharedobjects in flash mx, and i am trying now do to a little application, and in this application i will use a listbox to do some things, i have a message board that will keep the messages in the sharedobject named "visitas", i add data with a function, ,here it is:
function salvaMensagens(){
var num = Number(_root.entradas.text);
visitas.data.mensagens[num] = _root.mensagem.text;
visitas.data.visitantes[num][num] = _root.nome.text;
visitas.data.visitantes[num][num + 1] = _root.email.text;
_root.display.text = visitas.data.mensagens.length;
_root.lista.addItem(_root.nome.text, _root.email.text);
//trace(nome.text + " - " + email.text);
visitas.data.flush();
}
this line:
_root.lista.addItem(_root.nome.text, _root.email.text);
it had to add the name digited in the input text field name, and the same with the email, respectivelly , label and data, but my listbox is still empty after several tryes..
please, could someone help?