FlatoupiX
Messages postés12Date d'inscriptionlundi 18 septembre 2006StatutMembreDernière intervention 1 juillet 2009
-
30 avril 2009 à 13:05
FlatoupiX
Messages postés12Date d'inscriptionlundi 18 septembre 2006StatutMembreDernière intervention 1 juillet 2009
-
7 mai 2009 à 09:26
Bonjour,
Je suis en train de créer mon site Flash et j'aimerais faire un bouton qui, quand on passe dessus déclenche une animation, quand on click ça déclenche une autre animation et quand on enlève la souris l'animation se rambobine.
Seulement pour arriver à ça j'ai du rusé comme un saligaud.
voilà mon code
Bouton.stop();
var anime:Number = 0;
Zclik.addEventListener(MouseEvent.MOUSE_OVER,vegetation);
function vegetation(evt:MouseEvent):void {
if (anime == 0) {
Bouton.gotoAndPlay(1);
anime = 1;
rewind = false;
}
}
Zclik.addEventListener(MouseEvent.CLICK,animate);
function animate(evt:MouseEvent):void {
if (Bouton.currentFrame == 15) {
Bouton.gotoAndPlay(31);
}
anime = 2;
}
Zclik.addEventListener(MouseEvent.MOUSE_OUT,revind);
function revind(evt:MouseEvent):void {
if (anime == 1) {
if (Bouton.currentFrame == 15) { Bouton.gotoAndPlay(15)
}
anime = 0;
}
if (anime == 2) {
if (Bouton.currentFrame == 43) {
Bouton.gotoAndPlay(43);
}
anime = 0;
}
}
Merci de votre si vous pouvez m'aider.
A voir également:
Utilisation de commande rewind() impossible dans Flash CS3