Après quelques tests, il semblerait que ça soit ma fonction qui soit mal placée... En voici le code :
//au préalable, j'ai chargé par des loadmovie des images dans des clips :
l'image par défaut est ds le clip nommé "grand"
les autres images (chaque projet contient plusieurs images) sont dans les clips "vign1", "vign2", "vign3", "vign4", "vign5" et "vign6".
//les clips contenant les chiffres sont d'abord rendus invisibles :
_root.drop_portfolio.menubouge.un._visible = 0;
_root.drop_portfolio.menubouge.deux._visible = 0;
_root.drop_portfolio.menubouge.trois._visible = 0;
_root.drop_portfolio.menubouge.quatre._visible = 0;
_root.drop_portfolio.menubouge.cinq._visible = 0;
_root.drop_portfolio.menubouge.six._visible = 0;
//début de la fonction :
function chargerImage() {
//barre de préchargement pour l'image affichée par défaut
jauge1._visible = 1;
_root.onEnterFrame = function() {
charge_1 = _root.drop_portfolio.grand.getBytesLoaded();
total_1 = _root.drop_portfolio.grand.getBytesTotal();
_root.drop_portfolio.jauge1._xscale = (charge_1/total_1)*100;
if (charge_1 == total_1) {
_root.drop_portfolio.jauge1._visible = 0;
}
charge_2 = _root.drop_portfolio.vign1.getBytesLoaded();
total_2 = _root.drop_portfolio.vign1.getBytesTotal();
if (charge_2 == total_2) {
_root.drop_portfolio.menubouge.un._visible = 1;
}
charge_3 = _root.drop_portfolio.vign2.getBytesLoaded();
total_3 = _root.drop_portfolio.vign2.getBytesTotal();
if (charge_3 == total_3) {
_root.drop_portfolio.menubouge.deux._visible = 1;
}
charge_4 = _root.drop_portfolio.vign3.getBytesLoaded();
total_4 = _root.drop_portfolio.vign3.getBytesTotal();
if (charge_4 == total_4) {
_root.drop_portfolio.menubouge.trois._visible = 1;
}
charge_5 = _root.drop_portfolio.vign4.getBytesLoaded();
total_5 = _root.drop_portfolio.vign4.getBytesTotal();
if (charge_5 == total_5) {
_root.drop_portfolio.menubouge.quatre._visible = 1;
}
charge_6 = vign5.getBytesLoaded();
total_6 = vign5.getBytesTotal();
if (charge_6 == total_6) {
_root.drop_portfolio.menubouge.cinq._visible = 1;
}
charge_7 = vign6.getBytesLoaded();
total_7 = vign6.getBytesTotal();
if (charge_7 == total_7) {
_root.drop_portfolio.menubouge.six._visible = 1;
}
};
}
pourquoi cette fonction ne marche t elle que lors du premier clic vers le portfolio, et ne marche plus lorsque je veux le réouvrir. (ce portefolio est chargé dans un clip dynamique, qui est "deleté" lorsque je clique sur "fermer")
j'espère que ce post est suffisamment clair pour qu'une âme charitable m'aide... Je suis complètement coincée et ce bug est le dernier... apèrs j'ai tout bon :'(
Lotte
