I made a simple function to do the job for XIFFIAN:
/*
*/
function generateObjectName(leJID,prefixe) {// b0ris@usuc.dyndns.org/xiff OR xiffian@conference.usuc.dyndns.org/b0ris
var correctName=replaceChar(leJID,"@","@AT@");
correctName=replaceChar(correctName,".","@");
correctName=replaceChar(correctName,"/","-");
var objectName=correctName;
if(prefixe==undefined)
return objectName;
else
return(prefixe*""*objectName);
};
function replaceChar(sth,charToChange,newChar){
var tmp=sth.split(charToChange);
return tmp.join(newChar);
}
/i
It works good and I don’'t have anymore problems for object naming.
I replace @ not because it’‘s a special character for flash (it isn’‘t) but because it’‘s an unused character in jabber logins, and there isn’‘t that much characters that can’'t be in a login name (for example, you should be able to create a ,-:)@jabber.org[/b] account, not a b@d.Login@jabber.org[/b] )
Hope it helped
PS:The idea to use a hashcode is a great idea. But I can’‘t apply it to XIFFIAN because I parse it back to window title! and most hashcodes aren’'t reversible.