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
| import flash.display.*;
import flash.events.*;
import flash.display.Sprite;
import flash.net.navigateToURL;
import flash.net.URLRequest;
import flash.net.URLVariables;
Fichier_XML = new XML();
Fichier_XML.ignoreWhite = true;
Fichier_XML.load("fichier.xml");
Fichier_XML.onLoad = function(Reussite)
{
if (Reussite)
{
x = Fichier_XML.firstChild;
for(i = 0; x.childNodes[i] != undefined; i++)
{
mc1.graphics.lineStyle(15,116233102,255);
j = i+1 ;
_root.createEmptyMovieClip("ligne",j);
ligne.lineStyle (3, x.childNodes[i].attributes.color, 100);
ligne.moveTo( x.childNodes[i].attributes.x_debut,x.childNodes[i].attributes.y_debut);
ligne.lineTo( x.childNodes[i].attributes.x_fin, x.childNodes[i].attributes.y_fin);
}
}
else
{
Voir_xml = "Erreur lors du chargement du fichier XML";
}
}; |
Partager