Bonjour,
J'ai un problème plutôt épineux, celui qui me résoud ça est un vrai balaise !
j'ai tout une série de swf qui contiennent un script pour charger dynamiquement des images (à partir du xml). Fort bien... mais quand je charge ces swf dans un autre swf, un à un mais en les alternant fréquemment, l'alternance des images s'emballent !
J'ai essayé de décharger les clips chaque fois, de supprimer l'interval... ça marche pas ...
Ca, c'est la fonction qui qui appelle les swf :
function chargeEtLog(leFichierACharger,laPage){
ressourceName=laPage;
zoneModifiable_mc.unloadMovie(leFichierACharger);
zoneModifiable_mc.loadMovie(leFichierACharger);
}
et ça, c'est le script du diaporama :
clearInterval(timerInterval);
/* METTRE EVENTUELLEMENT DANS UN FICHIER EXTERNE */
function chargeEtLog(leFichierACharger,laPage){
ressourceName=laPage;
//zoneModifiable_mc.unloadMovie(leFichierACharger);
zoneModifiable_mc.loadMovie(leFichierACharger);
}
function rafraichirLeTexte(leContenu){
zoneModifiable_mc.zoneTexte_mc.contenu_txt.text="";
zoneModifiable_mc.zoneTexte_mc.play();
zoneModifiable_mc.zoneTexte_mc.contenu_txt.text=leContenu;
}
//gérer la musique de fond
var musiqueDeFond:Sound=new Sound;
musiqueDeFond.loadSound("sounds/ceed.mp3",true);
musiqueDeFond.start();
var leVolume=100;
var equaliserAlpha=100;
SoundOn_btn.onRelease=function(){
_root.onEnterFrame=function(){
musiqueDeFond.setVolume(leVolume);
equalizer._alpha=equaliserAlpha;
leVolume+=2;
equaliserAlpha+=2;
if(leVolume>100){
delete _root.onEnterFrame;
}
}
}
SoundOff_btn.onRelease=function(){
_root.onEnterFrame=function(){
musiqueDeFond.setVolume(leVolume);
equalizer._alpha=equaliserAlpha;
leVolume-=2;
equaliserAlpha-=2;
if(leVolume<1){
delete _root.onEnterFrame;
}
}
}
/* TOUT CA RESTE DANS CE FICHIER */
stop();
chargeEtLog("home.swf","see");
/* NAVIGATION */
// TESTDRIVE ::::::::::::::::::::::::::::::::::
testDrive_btn.onPress=function(){
chargeEtLog("taste.swf","taste");
rafraichirLeTexte(_root.tasteContent);
}
testDrive_btn.onPress=function(){
chargeEtLog("taste.swf","taste");
rafraichirLeTexte(_root.tasteContent);
}
// SEE ::::::::::::::::::::::::::::::::::::::::
seeImg_btn.onPress = function() {
chargeEtLog("see.swf","see");
rafraichirLeTexte(_root.seeContent);
}
see_btn.onPress=function(){
chargeEtLog("see.swf","see");
rafraichirLeTexte(_root.seeContent);
}
// HEAR :::::::::::::::::::::::::::::::::::::::
hearImg_btn.onPress=function(){
chargeEtLog("hear.swf","hear");
rafraichirLeTexte(_root.hearContent);
}
hear_btn.onPress=function(){
chargeEtLog("hear.swf","hear");
rafraichirLeTexte(_root.hearContent);
}
// TOUCH :::::::::::::::::::::::::::::::::::::::
touchImg_btn.onPress=function(){
chargeEtLog("touch.swf","touch");
rafraichirLeTexte(_root.touchContent);
}
touch_btn.onPress=function(){
chargeEtLog("touch.swf","touch");
rafraichirLeTexte(_root.touchContent);
}
// FEEL :::::::::::::::::::::::::::::::::::::::
feelImg_btn.onPress=function(){
chargeEtLog("feel.swf","feel");
rafraichirLeTexte(_root.feelContent);
}
feel_btn.onPress=function(){
chargeEtLog("feel.swf","feel");
rafraichirLeTexte(_root.feelContent);
}
// TASTE :::::::::::::::::::::::::::::::::::::::
tasteImg_btn.onPress=function(){
chargeEtLog("taste.swf","taste");
rafraichirLeTexte(_root.tasteContent);
}
taste_btn.onPress=function(){
chargeEtLog("taste.swf","taste");
rafraichirLeTexte(_root.tasteContent);
}
// HOME :::::::::::::::::::::::::::::::::::::::
home_btn.onPress=function(){
chargeEtLog("home.swf","home");
rafraichirLeTexte(_root.tasteContent);
}