Ereignis-Sound-Schaltfläche reagiert online nicht [Flash 10]
| Beiträge: 2 Registriert: Nov 2011
| 01.11.2011, 14:03
Hallo
Ich brauche dringend Hilfe. Meine Kenntnisse in AS2 sind recht beschränkt und ich bin wieder mal an eine Grenze gestossen:
Ich erstelle gerade eine Internetseite auf der einiges an Musik abzuspielen ist (www.jonathanvondannen.de).
daher habe ich einen Button angelegt und folgendes Script verwendet, welches die einzelnen Lieder ansteuern soll. Im Flashprogram selbst spielt die SWF auch alles reibungslos ab, aber sobald ich die SWF aus dem Explorer heraus oder im Internet aufrufe wird die Schaltfläche zum Abspielen nicht erkannt.
Script:
//Signal initialisieren
zustand = "aus";
musik = new Sound(this);
musik.loadSound("Boandlkramer.mp3" , false);
musik.onLoad = function (erfolgreich){
if (erfolgreich) {
trace("geladen");
mc_icons.gotoAndStop(3);
//Lautstärke
musik.setVolume(100);
//Wiedergabe starten (zweiterOffset, wiederholung)
musik.stop(0, 20);
//btn_onoff
btn_onoff.onPress = function() {
if (zustand == "aus") {
musik.start(0, 20);
mc_icons.gotoAndStop(2);
zustand = "an";
musik1.stop();
mc_icons1.gotoAndStop(3);
zustand1 = "aus";
musik2.stop();
mc_icons2.gotoAndStop(3);
zustand2 = "aus";
musik2.stop();
mc_icons2.gotoAndStop(3);
zustand2 = "aus";
musik3.stop();
mc_icons3.gotoAndStop(3);
zustand3 = "aus";
musik4.stop();
mc_icons4.gotoAndStop(3);
zustand4 = "aus";
musik5.stop();
mc_icons5.gotoAndStop(3);
zustand5 = "aus";
musik6.stop();
mc_icons6.gotoAndStop(3);
zustand6 = "aus";
musik7.stop();
mc_icons7.gotoAndStop(3);
zustand7 = "aus";
musik8.stop();
mc_icons8.gotoAndStop(3);
zustand8 = "aus";
musik9.stop();
mc_icons9.gotoAndStop(3);
zustand9 = "aus";
musik10.stop();
mc_icons10.gotoAndStop(3);
zustand10 = "aus";
musik11.stop();
mc_icons11.gotoAndStop(3);
zustand11 = "aus";
} else if (zustand == "an") {
musik.stop();
mc_icons.gotoAndStop(3);
zustand = "aus";
}
}; //btn_onoff Ende
} //if Ende
} //Funktion Ende | | | Beiträge: 1776 Wohnort: Laimbach 6 1/2 Registriert: Nov 2002
| 02.11.2011, 11:43
|
|