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 37 38 39
| onClipEvent(load)
{
function endPause()
{
play();
}
var text_fmt:TextFormat = new TextFormat();
text_fmt.font = "FGB";
text_fmt.color = 0xFFFFFF;
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)
{
txt1=DOCXML.firstChild.childNodes[0].attributes.MenuLib.toString();
_root.MC1.txtMenu1 = "" ; // on vide le champ dynamique
_root.MC1.txtMenu1.embedFonts = true;
_root.MC1.txtMenu1.setNewTextFormat(text_fmt);
debut = 0 ;
for (i=0 ; i <= txt1.length ; i++) {
_root.MC1.txtMenu1.text = txt1.substr(debut, i) ; // voir String.substr dans le dico
stop();
setTimeout(endPause, 5000);
}
}
}
} |