Erreur flash

Fermé
ilian96 - 7 déc. 2010 à 23:01
 ilian96 - 8 déc. 2010 à 10:54
Bonjour, depuis 1 ans je travail sur macromedia flash 8 . Mais a ce jour j'ai voulu creer un clip qui joue des sons a des heures précise mais l problème c'est que j'obtien une erreur.
voici le script:
onClipEvent (enterFrame) {
time = new Date();
mil = time.getMilliseconds();
s = time.getSeconds();
m = time.getMinutes();
h = time.getHours();
if (h==00 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 00h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 00h.mp3", true)

};
}
if (h==01 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 01h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 01h.mp3", true)

};
}
if (h==02 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 02h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 02h.mp3", true)

};
}
if (h==03 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 03h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 03h.mp3", true)

};
}
if (h==04 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 04h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 04h.mp3", true)

};
}
if (h==05 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 05h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 05h.mp3", true)

};
}
if (h==06 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 06h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 06h.mp3", true)

};
}
if (h==07 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 07h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 07h.mp3", true)

};
}
}
if (h==08 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 08h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 08h.mp3", true)

};
}
if (h==09 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 09h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 09h.mp3", true)

};
}
if (h==10 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 10h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 10h.mp3", true)

};
}
if (h==11 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 11h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 11h.mp3", true)

};
}
if (h==12 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 12h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 12h.mp3", true)

};
}
if (h==13 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 13h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 13h.mp3", true)

};
}
if (h==14 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 14h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 14h.mp3", true)

};
}
if (h==15 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 15h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 15h.mp3", true)

};
}
if (h==16 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 16h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 16h.mp3", true)

};
}
if (h==17 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 17h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 17h.mp3", true)

};
}
if (h==18 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 18h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 18h.mp3", true)

};
}
if (h==19 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 19h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 19h.mp3", true)

};
}
if (h==20 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 20h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 20h.mp3", true)

};
}
if (h==21 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 21h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 21h.mp3", true)

};
}
if (h==22 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 22h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 22h.mp3", true)

};
}
if (h==23 && m==00 && s==00) {
var mp3:Sound= new Sound()
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 23h.mp3", true)
mp3.onSoundComplete = function() {
mp3.loadSound("E:\ Animal Crossing\ Animal Crossing Wild World - 23h.mp3", true)

};
}
et voici l'erreur:

**Erreur** Séquence = Séquence 1, calque = Calque 1, image = 1 :Ligne 72 : ')' attendu
if (h==08 && m==00 && s==00) {

Total des erreurs ActionScript : 1 Erreurs signalées : 1
merci de me répondre .
A voir également:

1 réponse

en faite j'ai résolu le probleme
erreur : if(h==08
valide : if(h==8
0