Insérer 2 boutons-poussoirs appelés bson1 et bson2
Ouvrir la fenêtre de bibliothèque
Fenêtre - Bibliothèque
Importer les sons (*.mp3 ou *.wav ) dans la bibliothèque
Fichier - Importer - Importer dans la bibliothèque (Import to Library)
Sélectionner le son dans la bibliothèque
puis clic bouton droit, Liaison (Linkage)
donner un nom son1
et cocher les cases Exporter pour ActionScript
et Exporter dans la première page
Recommencer pour le son 2
Ecriture du script
dans Calque 1 : Image 1
song1 = new Sound()
song1.attachSound("son1")
song2 = new Sound()
song2.attachSound("son2")
_root.bson1.onRelease = function() {
song1.start()
}
_root.bson2.onRelease = function() {
song2.start()
}
Programme source : son.fla | Programme objet : son.swf |