1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| onClipEvent(load)
{
function endPause(){
play();
}
var cible:MovieClip = this;
var text_fmt:TextFormat = new TextFormat();
text_fmt.font = "Font 1";
text_fmt.color = 0xFFFFFF;
cible.txtMenu1.setNewTextFormat(text_fmt);
if (_root.Langue!=null){
FicXML = "AccueilBridor"+_root.Langue+".xml";
}else{
FicXML = "AccueilBridoren.xml";
}
var DOCXML:XML= new XML(); //création de l'objet XML
DOCXML.load(FicXML); //charge le document
DOCXML.ignoreWhite=true; //ignorer les sauts de ligne
DOCXML.onLoad = function (ok : Boolean)
{
if (ok){
cible.txtMenu1 = "" ; // on vide le champ dynamique
cible.txtMenu1.embedFonts = true;
txt1=DOCXML.firstChild.childNodes[0].attributes.MenuLib.toString();
debut = 0 ;
for (i=0 ; i <= txt1.length ; i++) {
cible.txtMenu1.text = txt1.substr(debut, i) ; // voir String.substr dans le dico
stop();
setTimeout(endPause, 5000);
}
}
}
} |
Partager