1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| xmin = 5;
ymin = 5;
xmax = 145;
ymax = 45;
this.createEmptyMovieClip("zone", 0);
zone.lineStyle(0, 0, 100);
zone.beginFill("0xff0000", 150);
zone.moveTo(xmin, ymin);
zone.lineTo(xmax, ymin);
zone.lineTo(xmax, ymax);
zone.lineTo(xmin, ymax);
zone.lineTo(xmin, ymin);
zone.endFill();
afficherLeBouton = function(){
this.createEmptyMovieClip("bouton", 0);
bouton.lineStyle(0, 0, 100);
bouton.beginFill("0xff0000", 150);
bouton.moveTo(xmin, ymin);
bouton.lineTo(xmax, ymin);
bouton.lineTo(xmax, ymax);
bouton.lineTo(xmin, ymax);
bouton.lineTo(xmin, ymin);
bouton.endFill();
}
afficherLeBouton();
bouton.onPress = function(){
bouton.clear();
}
bouton.onReleaseOutside = function(){
afficherLeBouton();
} |
Partager