logo
g Text Version
Auto
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Society & Culture
Sports
Travel & Leisure
TV & Movies

dailyclick
Bored? Games!
Postcards
Astrology
Take a Quiz
Rate My Photo

new
Journals
Folklore and Mythology
Business Coach
Marriage
Senior Living
Ethnic Beauty
Adolescence


dailyclick
All times in EST

Autism Spectrum Disorders: 4:00 PM

Full Schedule
g
g Flash Site
Diane Cipollo
BellaOnline's Flash Editor

g

Adding Behaviors To The Menu Buttons For Your Flash Website

In the last tutorial, you added the content for the individual pages of your Flash website to the Content layer along the Timeline. But you still need a way to navigate from one page to the next and like all websites we will use the buttons in the navigation menu. We have already created these buttons and now we will assign behaviors that will tell our Flash website which frame, and its contents, to display for each button. But you won't need to write any code. We will use Flash's built-in behaviors from the Behaviors Panel. So if you are ready, let's get started.

Step 1. Choose A Button. Click on Frame 1 on the Timeline Header to set the Playhead back to the beginning. The first button we will work on is the Home button so click on the Home button on your website menu.

Step 2. Behaviors Panel. The Behaviors Panel should be open in the Flash workspace so click on the Add Behavior button (plus sign) to open the drop-down list. Choose MovieClip > Goto and Stop at frame or label.

Step 3. Goto Dialog Box. In the Goto and Stop at frame or label dialog box, keep the this, _root and Relative settings for the movieclip. Now type in the name of the frame you wish to go to, which in this case is Home, and click OK. If you open the Actions Panel you will see the following code has been added. This code tells your Flash movie to go to the Home frame when the Home button is released (clicked on).

on (release) {

//Movieclip GotoAndStop Behavior
this.gotoAndStop("Home");
//End Behavior

}

Step 4. Repeat For Each Button. Repeat the previous steps for each button in your menu but each time type in the name of the corresponding frame in the dialog box.

Contact
Artist
Products
Weblog
Portfolio

Step 5. Test The Buttons. Click on Frame 1 on the Timeline Header to set the Playhead back to the beginning. Now click the Ctrl and Enter keys on your computer keyboard to open a preview of your website for testing. Click on each button in the menu and verify that the correct contents is displayed.

Step 6. Save Your Flash Movie. You can now save the new additions to your movie. Click File> Save.

Macromedia Flash MX 2004 Workspace




RSS | Related Articles | Previous Features | Site Map

Add Adding+Behaviors+To+The+Menu+Buttons+For+Your+Flash+Website to Twitter Add Adding+Behaviors+To+The+Menu+Buttons+For+Your+Flash+Website to Facebook Add Adding+Behaviors+To+The+Menu+Buttons+For+Your+Flash+Website to MySpace Add Adding+Behaviors+To+The+Menu+Buttons+For+Your+Flash+Website to Del.icio.us Digg Adding+Behaviors+To+The+Menu+Buttons+For+Your+Flash+Website Add Adding+Behaviors+To+The+Menu+Buttons+For+Your+Flash+Website to Yahoo My Web Add Adding+Behaviors+To+The+Menu+Buttons+For+Your+Flash+Website to Google Bookmarks Add Adding+Behaviors+To+The+Menu+Buttons+For+Your+Flash+Website to Stumbleupon Add Adding+Behaviors+To+The+Menu+Buttons+For+Your+Flash+Website to Reddit


Content copyright © 2009 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.

g


For FREE email updates, subscribe to the Flash Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor

g features
Adobe Certified Training Resources

Adobe Certification

Disney Haunted Holidays and Flash Video

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter

jobs
what
job title, keywords
where
city, state or zip
jobs by job search


vote
Growing a Garden
Veggies and Flowers
Veggies Only
Flowers Only
No Garden

g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2009 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor