[FLASH 8] synchroniser les load
:D Bonjour :D
J'ai ce code:
Code:
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
|
var story2a:XML = new XML();
var story2b:XML = new XML();
var story2c:XML = new XML();
var story2d:XML = new XML();
story2a.ignoreWhite = true;
story2a.load("textes/Entreprise1.html");
story2b.ignoreWhite = true;
story2b.load("textes/Entreprise2.html");
story2c.ignoreWhite = true;
story2c.load("textes/Entreprise3.html");
story2d.ignoreWhite = true;
story2d.load("textes/Entreprise4.html");
story2a.onLoad = function ()
{
monCadre.detail.textes.libelle2a.htmlText = story2a;
supprLoading();
}
story2b.onLoad = function ()
{
monCadre.detail.textes.libelle2b.htmlText = story2b;
monCadre.detail.textes.libelle2b._y = monCadre.detail.textes.libelle2a._y + monCadre.detail.textes.libelle2a._height;
supprLoading();
}
story2c.onLoad = function ()
{
monCadre.detail.textes.libelle2c.htmlText = story2c;
monCadre.detail.textes.libelle2c._y = monCadre.detail.textes.libelle2b._y + monCadre.detail.textes.libelle2b._height;
supprLoading();
}
story2d.onLoad = function ()
{
monCadre.detail.textes.libelle2d.htmlText = story2d;
monCadre.detail.textes.libelle2d._y = monCadre.detail.textes.libelle2c._y + monCadre.detail.textes.libelle2c._height;
supprLoading();
}
} |
Donc je tente de placer les _y d'un texte en fonction du texte précédent. Evidemment commes les .html se chargent tous à des temps différents, pas en ordre du lancement du load, je me retrouve avec les champs de texte tous mal placés.
Comment peut-on gérer ces chargements asynchrones d'une façon simple?
Merci !!!!