|
Publicité ' | |||||||||||||||||||||||
|
|
#1 |
|
Invité de passage
![]() Inscription : novembre 2007 Messages : 4 ![]() |
bonjour à tous, voici mon souci :
J'ai un clip A qui contient 10 boutons de 4 états (dehors (gris clair), survol (bleu), cliqué (gris fonçé), actif (blanc)) J'ai un clip B qui reçoit les swf externes chargés dès qu'on clique sur un des boutons. Le scénario d'usage est le suivant : quand je clique sur le bouton 01 j'ai une image grise foncé qui aparait jusqu'à ce que je relache le bouton. le projet se charge dans le clip B, et le bouton dont je viens passe en blanc (actif). quand je survol ce bouton 01 : rien ne devrait se passer bien entendu , je survol un autre bouton qui passe en bleu, je clique (passage en gris foncé), le projet se charge à la place de l'autre dans le clip B, et mon bouton 02 passe en blanc en expliquant au bouton 01 de repasser en "dehors" c'est à dire gris clair. Et c'est là que ça dérape : nous ne trouvons pas comment réactiver le bouton précédent quand on clique sur un nouveau. Merci d'avance : on s'arrache un peu les cheveux ! |
|
|
00
|
|
|
#2 |
|
Invité de passage
![]() Inscription : novembre 2007 Messages : 4 ![]() |
my_xml = new XML();
my_xml.ignoreWhite = true; my_xml.onLoad = function(ok) { _global.noeuds = my_xml.firstChild; _global.numPhoto= noeuds.childNodes.length; if(ok){ ligne = 0;//ligne = alignement vertical colonne = 1;//colonne = alignement horizontal /*ligne = (numPhoto/2);*/ for (i=0; i<numPhoto; i++) { ligne ++; MCconteneur.MCphoto._x = 10; MCconteneur.MCphoto._y = 0; MCconteneur.MCphoto.duplicateMovieClip("MCphoto"+i,i); MCconteneur["MCphoto"+i]._x =MCconteneur.MCphoto._x + (MCconteneur.MCphoto._width); MCconteneur["MCphoto"+i]._y = MCconteneur.MCphoto._y + (MCconteneur.MCphoto._height)*ligne -40; linge++ MCconteneur["MCphoto"+i].MCimage._xscale =100; MCconteneur["MCphoto"+i].MCimage._yscale =100; MCconteneur["MCphoto"+i].mc_cible.loadMovie(noeuds.childNodes[i].attributes.picto1); /************DEBUT GESTION BOUTONS MC_MENU******************************************************************/ //debut function ONLOAD MCconteneur["MCphoto"+i].onLoad= function() { chaine = this._name; indice = chaine.substr(7, 2); this.mc_cible.loadMovie(noeuds.childNodes[indice].attributes.picto1); }//fin function ONLOAD /*//debut function ONSETFOCUS MCconteneur["MCphoto"+i].onSetFocus = function() { MCconteneur["MCphoto"+i].mc_cible.loadMovie(noeuds.childNodes[i].attributes.picto1); chaine = this._name; indice = chaine.substr(7, 2); this.mc_cible.loadMovie(noeuds.childNodes[indice].attributes.picto2); }//fin function ONSETFOCUS*/ //debut function ONROLLOVER MCconteneur["MCphoto"+i].onRollOver = function() { chaine = this._name; indice = chaine.substr(7, 2); this.mc_cible.loadMovie(noeuds.childNodes[indice].attributes.picto2); }//fin function ONROLLOVER //debut function ONPRESS MCconteneur["MCphoto"+i].onPress = function() { chaine = this._name; indice = chaine.substr(7, 2); this.mc_cible.loadMovie(noeuds.childNodes[indice].attributes.picto3); _root.mc_intro._visible = false; //debut agrandissement photo//////////////////////////////////////////////////////////////////////////////////////////////// _root.createEmptyMovieClip("MCdiapo", numPhoto+1000); _root.MCdiapo._x = 80; _root.MCdiapo._y = 20; _root.MCdiapo.createEmptyMovieClip("MCgdimg", numPhoto+10000); _root.MCdiapo.MCgdimg.loadMovie(noeuds.childNodes[indice].attributes.anim); _root.MCdiapo.MCgdimg._xscale =80; _root.MCdiapo.MCgdimg._yscale =80; //fin agrandissement photo//////////////////////////////////////////////////////////////////////////////////////////////// } //debut function ONRELEASE MCconteneur["MCphoto"+i].onRelease = function() { chaine = this._name; indice = chaine.substr(7, 2); this.mc_cible.loadMovie(noeuds.childNodes[indice].attributes.picto4); }//fin function ONRELEASE //debut function onMouseUp MCconteneur["MCphoto"+i].onMouseUp = function() { chaine = this._name; indice = chaine.substr(7, 2); this.mc_cible.loadMovie(noeuds.childNodes[indice].attributes.picto1); }//fin function onMouseUp //debut function ONROLLOUT MCconteneur["MCphoto"+i].onRollOut = function() { chaine = this._name; indice = chaine.substr(7, 2); this.mc_cible.loadMovie(noeuds.childNodes[indice].attributes.picto4); }//fin function onMouseUp /************FIN GESTION BOUTONS MC_MENU******************************************************************/ } //fin for() } }; ////////////////////////////////debut BOUTON deplacement YY=40; this.bt_suivante._visible = false; this.bt_precedente._visible = true; _root.onEnterFrame = function(){ MCconteneur._y+=(YY-MCconteneur._y)/2; if(MCconteneur._y>=MCconteneur._yscale ){ YY=40; }else{ this.bt_suivante._visible = false; this.bt_precedente._visible = true; _root.bt_precedente.onPress = function(precedente){ YY-=140; } _root.bt_precedente.onRelease = function(precedente){ YY+=0; } _root.bt_suivante.onPress = function(suivante){ YY+=140; } _root.bt_suivante.onRelease = function(suivante){ YY+=0; } if(MCconteneur._y<=-(18*numPhoto)/2 ){ YY=(-21*numPhoto)/2; this.bt_suivante._visible = true; this.bt_precedente._visible = false; }else{ _root.bt_precedente.onPress = function(precedente){ YY-=140; } _root.bt_precedente.onRelease = function(precedente){ YY+=0; } _root.bt_suivante.onPress = function(suivante){ YY+=140; } _root.bt_suivante.onRelease = function(suivante){ YY+=0; } } }; };//fin de function OK //////////////////////////////////fin BOUTON deplacement my_xml.load("info-gamme.xml"); Merci d'avance : |
|
|
00
|
Copyright © 2000-2012 - www.developpez.com