home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 136
/
MOBICLIC136.ISO
/
pc
/
DATA
/
ENG136
/
ENG136_00
/
ENG136_00.swf
/
scripts
/
frame_2
/
DoAction.as
Wrap
Text File
|
2011-07-20
|
1KB
|
42 lines
function getTextById(myXML, attributeValue)
{
myStyle = undefined;
myText = undefined;
myText = this.recusiveGetTextByAttribute(myXML,"id",attributeValue);
if(myText == undefined)
{
trace(attributeValue + " n\'existe pas dans XML");
}
return myText;
}
function recusiveGetTextByAttribute(node, attribute, attributeValue)
{
var _loc2_ = 0;
while(_loc2_ < node.childNodes.length)
{
if(node.childNodes[_loc2_].attributes[attribute] == attributeValue)
{
myText = node.childNodes[_loc2_].firstChild.nodeValue;
if(node.childNodes[_loc2_].attributes.style !== undefined)
{
myStyle = node.childNodes[_loc2_].attributes.style;
}
break;
}
if(node.childNodes[_loc2_].hasChildNodes())
{
this.recusiveGetTextByAttribute(node.childNodes[_loc2_],attribute,attributeValue);
}
_loc2_ = _loc2_ + 1;
}
return myText;
}
detecteGrilles();
gereTypes();
detectMascotte();
trace("listTypes " + listTypes);
trace("mascotte " + mascotte);
InitOk();
stop();
nodeLM = moduleInfo.returnNodeByPath("Module.AN.LegendesMedias");