Unit 02 - Design and Navigation
Importing Photoshop into Flash - Training Video 1 and Training Video 2
Creating Sections in Flash - Training Video
Adding Menu Buttons in Flash - Training Video
Programing Menus Button Part 01 - Training Video
stop();
//add an EventListener to a button instance
about.addEventListener(MouseEvent.CLICK,gotoPage);//create gotoPage function
function gotoPage(evtObj:MouseEvent) {
trace("about button was clicked")
}
Programing Menus Button Part 02 - Training Video
stop();
//add an EventListener to a button instance
home.addEventListener(MouseEvent.CLICK,gotoHome);
about.addEventListener(MouseEvent.CLICK,gotoAbout);
pictures.addEventListener(MouseEvent.CLICK,gotoPictures);
contact.addEventListener(MouseEvent.CLICK,gotoContact);//create gotoPage function
function gotoHome(evtObj:MouseEvent) {
trace("home button was clicked");
gotoAndStop("home");
}function gotoAbout(evtObj:MouseEvent) {
trace("about button was clicked");
gotoAndStop("about");
}function gotoPictures(evtObj:MouseEvent) {
trace("pictures button was clicked");
gotoAndStop("pictures");
}function gotoContact(evtObj:MouseEvent) {
trace("contact button was clicked");
gotoAndStop("contact");
}
Programing Menus Button Part 03 - Training Video
stop();
//add an EventListener to a button instance
home.addEventListener(MouseEvent.CLICK,gotoPage);
about.addEventListener(MouseEvent.CLICK,gotoPage);
pictures.addEventListener(MouseEvent.CLICK,gotoPage);
contact.addEventListener(MouseEvent.CLICK,gotoPage);//create gotoPage functions
function gotoPage(evtObj:MouseEvent) {
trace("the " + evtObj.target.name + " button was clicked")
gotoAndStop(evtObj.target.name);
}
Check this site out for more information
http://www.republicofcode.com/tutorials/flash/as3events/