Cita:
un saludo y gracias search_mc._visible = false;
searching._visible = false;
no_found._visible = false;
function load_xml() {
searching._visible = false;
no_found._visible = false;
//
System.useCodepage = true;
sXML = new XML();
sXML.ignoreWhite = true;
sXML.load("search.xml");
sXML.onLoad = function(ok) {
if (ok) {
search();
}
};
}
function search() {
//
found = 0;
total = sXML.firstChild.childNodes.length;
s=0;
//
searching._visible = false;
//
for (i=0; i<total; i++) {
removeMovieClip(_root["mc"+i]);
}
for (i=0; i<total; i++) {
//
search_place = sXML.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue.toString();
search_place2 = sXML.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue.toString();
//
if (search_place.toLowerCase().indexOf(search_text.te xt.toLowerCase())>-1 || search_place2.toLowerCase().indexOf(search_text.te xt.toLowerCase())>-1) {
found = 1;
search_mc.duplicateMovieClip("mc"+i, i);
search_mc._visible = false;
_root["mc"+i]._y = ((s)*(search_mc._height+10)) + (search_mc._y);
s++;
_root["mc"+i].title = sXML.firstChild.childNodes[i].childNodes[0].firstChild;
_root["mc"+i].description = sXML.firstChild.childNodes[i].childNodes[1].firstChild;
//---------------------------------------------------------------------------------------
}
}
if (found == 0) {
no_found._visible = true;
}
}
searching._visible = false;
no_found._visible = false;
function load_xml() {
searching._visible = false;
no_found._visible = false;
//
System.useCodepage = true;
sXML = new XML();
sXML.ignoreWhite = true;
sXML.load("search.xml");
sXML.onLoad = function(ok) {
if (ok) {
search();
}
};
}
function search() {
//
found = 0;
total = sXML.firstChild.childNodes.length;
s=0;
//
searching._visible = false;
//
for (i=0; i<total; i++) {
removeMovieClip(_root["mc"+i]);
}
for (i=0; i<total; i++) {
//
search_place = sXML.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue.toString();
search_place2 = sXML.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue.toString();
//
if (search_place.toLowerCase().indexOf(search_text.te xt.toLowerCase())>-1 || search_place2.toLowerCase().indexOf(search_text.te xt.toLowerCase())>-1) {
found = 1;
search_mc.duplicateMovieClip("mc"+i, i);
search_mc._visible = false;
_root["mc"+i]._y = ((s)*(search_mc._height+10)) + (search_mc._y);
s++;
_root["mc"+i].title = sXML.firstChild.childNodes[i].childNodes[0].firstChild;
_root["mc"+i].description = sXML.firstChild.childNodes[i].childNodes[1].firstChild;
//---------------------------------------------------------------------------------------
}
}
if (found == 0) {
no_found._visible = true;
}
}