Hallo Leute
Ich hab hier mal ein kleises Experiment gestartet um bisschen mit Sound in Action-Script umgehen zu lernen.
Ich habe eine Art mischpult gemacht. Vier verschiedene Soundarten (Im script Stationen genannt) mit je viel Melodieen/Rythmen. (Also 16 verschiedene Sounds)
Mein Problem ist jetzt, dass nur die ersten zwei Stationen funktionieren. Wenn ich aber die letzten zwei Stationen (im Script) am Anfang schreibe, funktionieren die ersten zwei nicht!
Flash akzeptiert also nur die ersten 8 Sounds vom Script!
Wie kann ich das Problem bewältigen bzw. umgehen?
Danke erstmal!
Hier mein Projektchen (144kb) Und hier die Fla-Datei (Jedoch ohne sound! 48kb)
Hier das Script:
Frame 1:
ActionScript:
// Station 1
Soundaa = new Sound(maa);
Soundab = new Sound(mab);
Soundac = new Sound(mac);
Soundad = new Sound(mad);
Soundaa.attachSound("musicaa");
Soundab.attachSound("musicab");
Soundac.attachSound("musicac");
Soundad.attachSound("musicad");
Soundaa.start(0, 1000000000);
Soundab.start(0, 1000000000);
Soundac.start(0, 1000000000);
Soundad.start(0, 1000000000);
// Station 2
Soundba = new Sound(mba);
Soundbb = new Sound(mbb);
Soundbc = new Sound(mbc);
Soundbd = new Sound(mbd);
Soundba.attachSound("musicba");
Soundbb.attachSound("musicbb");
Soundbc.attachSound("musicbc");
Soundbd.attachSound("musicbd");
Soundba.start(0, 1000000000);
Soundbb.start(0, 1000000000);
Soundbc.start(0, 1000000000);
Soundbd.start(0, 1000000000);
// Station 3
Soundca = new Sound(mca);
Soundcb = new Sound(mcb);
Soundcc = new Sound(mcc);
Soundcd = new Sound(mcd);
Soundca.attachSound("musicca");
Soundcb.attachSound("musiccb");
Soundcc.attachSound("musiccc");
Soundcd.attachSound("musiccd");
Soundca.start(0, 1000000000);
Soundcb.start(0, 1000000000);
Soundcc.start(0, 1000000000);
Soundcd.start(0, 1000000000);
// Station 4
Soundda = new Sound(mda);
Sounddb = new Sound(mdb);
Sounddc = new Sound(mdc);
Sounddd = new Sound(mdd);
Soundda.attachSound("musicda");
Sounddb.attachSound("musicdb");
Sounddc.attachSound("musicdc");
Sounddd.attachSound("musicdd");
Soundda.start(0, 1000000000);
Sounddb.start(0, 1000000000);
Sounddc.start(0, 1000000000);
Sounddd.start(0, 1000000000);
Frame 2:
ActionScript:
// Station 1
faaa = getProperty("faaa", _y);
aav = 50-faaa+100;
faab = getProperty("faab", _y);
abv = 50-faab+100;
faac = getProperty("faac", _y);
acv = 50-faac+100;
faad = getProperty("faad", _y);
adv = 50-faad+100;
// Station 2
faba = getProperty("faba", _y);
bav = 50-faba+100;
fabb = getProperty("fabb", _y);
bbv = 50-fabb+100;
fabc = getProperty("fabc", _y);
bcv = 50-fabc+100;
fabd = getProperty("fabd", _y);
bdv = 50-fabd+100;
// Station 3
faca = getProperty("faca", _y);
cav = 50-faca+100;
facb = getProperty("facb", _y);
cbv = 50-facb+100;
facc = getProperty("facc", _y);
ccv = 50-facc+100;
facd = getProperty("facd", _y);
cdv = 50-facd+100;
// Station 4
fada = getProperty("fada", _y);
dav = 50-fada+100;
fadb = getProperty("fadb", _y);
dbv = 50-fadb+100;
fadc = getProperty("fadc", _y);
dcv = 50-fadc+100;
fadd = getProperty("fadd", _y);
ddv = 50-fadd+100;
// Station 1
Soundaa.setVolume(aav);
Soundab.setVolume(abv);
Soundac.setVolume(acv);
Soundad.setVolume(adv);
// Station 2
Soundba.setVolume(bav);
Soundbb.setVolume(bbv);
Soundbc.setVolume(bcv);
Soundbd.setVolume(bdv);
// Station 3
Soundca.setVolume(cav);
Soundcb.setVolume(cbv);
Soundcc.setVolume(ccv);
Soundcd.setVolume(cdv);
// Station 4
Soundda.setVolume(dav);
Sounddb.setVolume(dbv);
Sounddc.setVolume(dcv);
Sounddd.setVolume(ddv);
Frame 3: