Bonjour a vous, j ss amateur !!!
J viens creer un petit jeu (debile) lol
Avec RollOver et EnterFrame
J'arrive pas d reussir d bouton si vous connaissez bien
car j cherche bcp mais je ne trouve pas snifff
je vous laissez code
Xmin = 15;
Ymin = 15;
Xmax = 475;
Ymax = 355;
secu = 20;
//Bouton Haut
haut.onEnterFrame = function() {
};
haut.onRollOver = function() {
if (carre._y>Ymin+secu) {
carre._y = carre._y-20;
} else {
if (carre._y>Ymin) {
carre._y -= 1;
}
}
};
//Bouton Droite
droite.onRollOver = function() {
if (carre._x<Xmax-secu) {
carre._x = carre._x+20;
} else {
if (carre._x<Xmin) {
carre._x += 1;
}
}
};
//bouton Bas
bas.onRollOver = function() {
if (carre._y<Ymax-secu) {
carre._y = carre._y+20;
} else {
if (carre._y<Ymax) {
carre._y += 1;
}
}
};
//BoutonGauche
gauche.onRollOver = function() {
if (carre._x>Xmin+secu) {
carre._x = carre._x-20;
} else {
if (carre._x>Xmin) {
carre._x -= 1;
}
}
};
//Bouton Haut-gauche
hautgauche.onRollOver = function() {
if (carre._y>Ymin+secu) {
carre._y = carre._y-20;
} else {
if (carre._y>Ymin) {
carre._y -= 1;
}
}
if (carre._x>Xmin+secu) {
carre._x = carre._x-20;
} else {
if (carre._x>Xmin) {
carre._x -= 1;
}
}
};
//Bouton Bas-Gauche
basgauche.onRollOver = function() {
if (carre._y<Ymax-secu) {
carre._y = carre._y+20;
} else {
if (carre._y<Ymax) {
carre._y += 1;
}
}
if (carre._x>Xmin+secu) {
carre._x = carre._x-20;
} else {
if (carre._x>Xmin) {
carre._x -= 1;
}
}
};
//Bouton Haut-droite
hautdroite.onRollOver = function() {
if (carre._y>Ymin+secu) {
carre._y = carre._y-20;
} else {
if (carre._y>Ymin) {
carre._y -= 1;
}
}
if (carre._x<Xmax-secu) {
carre._x = carre._x+20;
} else {
if (carre._x<Xmin) {
carre._x += 1;
}
}
};
//Bouton Bas-Droite
basdroite.onRollOver = function() {
if (carre._y<Ymax-secu) {
carre._y = carre._y+20;
} else {
if (carre._y<Ymax) {
carre._y += 1;
}
}
if (carre._x<Xmax-secu) {
carre._x = carre._x+20;
} else {
if (carre._x<Xmin) {
carre._x += 1;
}
}
};
J espere qu vous trouvez Merci (dsl pour les phrases mal compris j ss sourd :s)