Zwei Buttons und Sound Rollover AS2/CS3 [Flash 9]
| Beiträge: 20 Registriert: Apr 2010
| 19.08.2010, 11:27
Ich habe zwei Buttons welche eine unterschiedliche Klick Funktion haben. Nun soll bei Rollover Sound abgespielt werden, dieser sollte jedoch nicht neu starten wenn den einen Button verlässt sondern erst wenn man den gesamten Button verlässt. Bin total verzweifelt und weiß nicht wie ich das anstellen soll.
Soweit mein Code.
ActionScript: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 | var my_sound:Sound = new Sound();
my_sound.loadSound("001.mp3", false);
soundIsPlaying = false;
button1.onRollOver = function() {
if( !soundIsPlaying){
my_sound.start(0,99);
soundIsPlaying = true;
}
};
_root.button1.onRollOut = function() {
if( !soundIsPlaying){
my_sound.stop();
soundIsPlaying = false;
gotoAndStop(1);
}
};
button2.onRollOver = function() {
if( !soundIsPlaying){
my_sound.start(0,99);
soundIsPlaying = true;
}
};
button2.onRollOut = function() {
if( !soundIsPlaying){
my_sound.stop();
soundIsPlaying = false;
gotoAndStop(1);
}
};
|
Ist das überhaupt zu realisieren? | | | Beiträge: 1776 Wohnort: Laimbach 6 1/2 Registriert: Nov 2002
| 19.08.2010, 11:36
|
|