stop();
var homeSound1:homeSound = new homeSound();
}
function onHomeClick(e:MouseEvent):void
{
gotoAndStop("Home");
homeSound1.play();
}
home_button.addEventListener(MouseEvent.CLICK, onHomeClick);
So the above code shows when the user clicks on the Home navigation the homeSound1 sound will play which is James's voice saying Home. I then did the same process for the Venues, Games and Colour In pages you can see below the full code.
stop();
var homeSound1:homeSound = new homeSound();
var venuesSound1:venuesSound = new venuesSound();
var gamesSound1:gamesSound = new gamesSound();
var colourinSound1:colourinSound = new colourinSound();
}
function onHomeClick(e:MouseEvent):void
{
gotoAndStop("Home");
homeSound1.play();
}
home_button.addEventListener(MouseEvent.CLICK, onHomeClick);
function onVenuesClick(e:MouseEvent):void
{
gotoAndStop("Venues");
venuesSound1.play();
}
venues_button.addEventListener(MouseEvent.CLICK, onVenuesClick);
function onGamesClick(e:MouseEvent):void
{
gotoAndStop("Games");
gamesSound1.play();
}
games_button.addEventListener(MouseEvent.CLICK, onGamesClick);
function onColourInClick(e:MouseEvent):void
{
gotoAndStop("ColourIn");
colourinSound1.play();
}
colourin_button.addEventListener(MouseEvent.CLICK, onColourInClick);
So with this code added to the navigation when the user clicked on the buttons James's voice would tell them what page they were on. I did the same process for the Venues buttons and Games buttons so when the user clicked on one of the images of the venues or games James's voice would tell them which venue that was or which game they had clicked on. The full code for the Venues is below:
stop();
var stadiumSound1:stadiumSound = new stadiumSound();
var aquacentreSound1:aquacentreSound = new aquacentreSound();
var basketballArenaSound1:basketballarenaSound = new basketballarenaSound();
var basketballSound1:basketballSound = new basketballSound();
var velodromeSound1:velodromeSound = new velodromeSound();
olympicstadium_button.addEventListener(MouseEvent.CLICK, onClick);
function onClick(e:MouseEvent):void {
gotoAndStop(1, "Scene 2");
stadiumSound1.play();
}
aquaticscentre_button.addEventListener(MouseEvent.CLICK, onScene3Click);
function onScene3Click(e:MouseEvent):void {
gotoAndStop(1, "Scene 3");
aquacentreSound1.play();
}
basketballarena_button.addEventListener(MouseEvent.CLICK, onScene5Click);
function onScene5Click(e:MouseEvent):void {
gotoAndStop(1, "Scene 5");
basketballArenaSound1.play();
}
velodrome_button.addEventListener(MouseEvent.CLICK, onScene4Click);
function onScene4Click(e:MouseEvent):void {
gotoAndStop(1, "Scene 4");
velodromeSound1.play();
}
function onNextbutton2Click(e:MouseEvent):void
{
gotoAndStop("Games");
}
And this is the code for the Games page:
stop();
var stadiumSound1:stadiumSound = new stadiumSound();
var aquacentreSound1:aquacentreSound = new aquacentreSound();
var basketballArenaSound1:basketballarenaSound = new basketballarenaSound();
var basketballSound1:basketballSound = new basketballSound();
var velodromeSound1:velodromeSound = new velodromeSound();
olympicstadium_button.addEventListener(MouseEvent.CLICK, onClick);
function onClick(e:MouseEvent):void {
gotoAndStop(1, "Scene 2");
stadiumSound1.play();
}
aquaticscentre_button.addEventListener(MouseEvent.CLICK, onScene3Click);
function onScene3Click(e:MouseEvent):void {
gotoAndStop(1, "Scene 3");
aquacentreSound1.play();
}
basketballarena_button.addEventListener(MouseEvent.CLICK, onScene5Click);
function onScene5Click(e:MouseEvent):void {
gotoAndStop(1, "Scene 5");
basketballArenaSound1.play();
}
velodrome_button.addEventListener(MouseEvent.CLICK, onScene4Click);
function onScene4Click(e:MouseEvent):void {
gotoAndStop(1, "Scene 4");
velodromeSound1.play();
}



