stop();
var homeSound1:homeSound = new homeSound();
var venuesSound1:venuesSound = new venuesSound();
var gamesSound1:gamesSound = new gamesSound();
var colourinSound1:colourinSound = new colourinSound();
var victorious1:victoriousSound = new victoriousSound();
var sc:SoundChannel;
var isPlaying1:Boolean = true;
if (isPlaying1 == true)
{
sc = victorious1.play();
var videoVolumeTransform:SoundTransform = new SoundTransform();
videoVolumeTransform.volume = 0.20;
sc.soundTransform = videoVolumeTransform;
}
Then so it only played on the Home page I added the following bit of code to all the other pages.
Adding this code meant the Victorious music would only play on the Home page.
To add the sound effects to the pictures of Ali participating in the sports I added the following code and then for each of the pictures I changed the name of the sound effect. The code below is for the track and field sound effect:
stop()
sc.stop();
var homeSound2:stadiumSound = new stadiumSound();
var venuesSound2:venuesSound = new venuesSound();
var gamesSound2:gamesSound = new gamesSound();
var colourinSound2:colourinSound = new colourinSound();
var trackandfieldSound2:trackandfieldSound = new trackandfieldSound();
trackandfieldpic.addEventListener(MouseEvent.ROLL_OVER, onTrackandfieldPic);
function onTrackandfieldPic(e:MouseEvent):void
{
trackandfieldSound2.play();
}
Adding this code meant when the user hovered over the pictures on each of the venues pages a sound effect would play relating to that sport.
No comments:
Post a Comment