/1. Assign listener Home button
home_btn.addEventListener(MouseEvent.CLICK, onClick);
//2. Event handler function Home button
function onClick(event:MouseEvent):void
{
trace("CLICK!");
var req:URLRequest = new URLRequest("index.htm");
navigateToURL(req,"_self");
}
//1. Assign listener Targets button
targets_btn.addEventListener(MouseEvent.CLICK, onTargetsClick);
//2. Event handler function Targets button
function onTargetsClick(event:MouseEvent):void
{
var req:URLRequest = new URLRequest("cat-toc.htm");
navigateToURL(req,"_self");
}
//1. Assign listener Clients button
clients_btn.addEventListener(MouseEvent.CLICK, onClientsClick);
//2. Event handler function Clients button
function onClientsClick(event:MouseEvent):void
{
var req:URLRequest = new URLRequest("clients.htm");
navigateToURL(req,"_self");
}
//1. Assign listener Projects button
projects_btn.addEventListener(MouseEvent.CLICK, onProjectsClick);
//2. Event handler function Projects button
function onProjectsClick(event:MouseEvent):void
{
var req:URLRequest = new URLRequest("ProjectSheetsMain.htm");
navigateToURL(req,"_self");
}
//1. Assign listener Contact button
contact_btn.addEventListener(MouseEvent.CLICK, onContactClick);
//2. Event handler function Contact button
function onContactClick(event:MouseEvent):void
{
var req:URLRequest = new URLRequest("contact.htm");
navigateToURL(req,"_self");
}
//1. Assign listener About button
about_btn.addEventListener(MouseEvent.CLICK, onAboutClick);
//2. Event handler function About button
function onAboutClick(event:MouseEvent):void
{
var req:URLRequest = new URLRequest("about.htm");
navigateToURL(req,"_self");
}
//1. Assign listener News button
newss_btn.addEventListener(MouseEvent.CLICK, onNewsClick);
//2. Event handler function News button
function onNewsClick(event:MouseEvent):void
{
var req:URLRequest = new URLRequest("news.htm");
navigateToURL(req,"_self");
}
|