# Present It! Animation

Creating Buttons with SWiSHmax

Many animations are created around interactivity, and the most common interface to begin an animation or cause an action is a button. In this section we look at how to create a button in SWiSHmax.

Before doing the tutorial, understand that an interactive button is said to have multiple states, depending on how the user is interacting with the button. These states are:

  • Up state. The default behavior of the button.
  • Over state. The button when a mouse is placed over it.
  • Down state. The button when it is clicked.
  • Hit state. The clickable area of the button.

You don’t have to use every state with your buttons, but the more you customize these states, the more interactive your button will appear to be – basically the better understanding the user will have of what is happening.

To create a button in SWiSHmax:

  1. Start a new movie.
  2. Use the Tools to draw a box on the stage.
  3. Click the Shape panel and give your button a name. In this example, the shape is called “Red Button.”
  4. Screenshot of Shape panelSelect the Line pull-down menu, and select a line style to outline your button. Set the width of the outline in the field that appears, then use the color menu to select an outline color. You can change the Fill color of the button in this panel as well.
  5. From the Modify menu, choose Convert > Convert to Button. Your object has now been turned into a button, and you will see a Button tab in the Objects panel.
  6. Click the boxes next to “Has separate over state” and “Has separate down state.” (It is only necessary to set a separate Hit state if the area that should be clickable is not the same shape as the button you created. For example, if your button is text, but you want the spaces around and between letters to be clickable, you could set a separate Hit state and define a larger area as clickable.)
  7. Take a look at the Outline panel. In it, you can see your Red Button object. Click the plus sign (Image of button in Outline panel) next to the object view all the button states.
  8. Image of button Over state in Outline panelTo set a new Fill color for the Over state, select the shape object under the Over State. SWiSHmax opens the Shape tab in the Objects panel. Select a new Fill color and a new line color if you wish.
  9. Image of button Down State in Outline panelTo set a new Fill or Outline color for the Down state, select the shape object under the Down State in the Outline panel. SWiSHmax opens the Shape tab in the Objects panel.
  10. Use the Shape tab to set new Fill and/or Outline colors.
  11. Click the play button (Image of Play button) in the icon menu across the top of the application to watch your animation. Place your mouse over the button, and click the button to preview the Over and Down states.
  12. Now it’s time to add the interactivity that will make your button actually do something when clicked. Some of the possibilities include:
    • Jumping to a specific frame in the animation.
    • Stopping or starting the animation.
    • Playing a sound.
    • Opening a Web page.

To apply interactivity you need to add a script to the button. Select Script from the Panels menu at the top of the application. The Script panel opens.

  1. In the Outline panel, select the Red Button object (you want the entire button to be selected, not just one of the button states).
  2. In the Script panel, click the Add Script pull-down menu Image of Add Script button. Then select Browser/Network > getURL(&hellipwink from the menu that appears. SWiSHmax places the code in the Script panel that will cause this action to occur. Below the code, you can see fields for the Properties you need to provide.
  3. In the URL field, type or paste the exact Web address you want the button to open. Remember to include the http://. For example: http://www.google.com
  4. The Window field allows you to target how the Web page opens. You don’t need to select anything if you want the page to open in the same browser window the user is currently using.
  5. Click the play button (Image of Play button) in the icon menu across the top of the application to preview your animation. When you click your button, the Web page should open in a browser window if you have an active Internet connection (even though you haven’t yet put the SWF onto your Web site).

> READ NEXT ARTICLE: Saving an SWF using SWiSHmax

 

recent comments

  • This was a VERY helpful tutorial on making interactive buttons in Swishmax. I would like to take this one step further, if it’s possible. Can you assign an effect to a state (Over state to be precise)? I’m wanting the button to jump (or any other effect the user chooses) and come to rest where it was when the mouse pointer in moved over it. Any help you can give is very much appreciated.

    Posted by  on  01/23  at  11:43 PM

post a comment

You must be registered (free) in order to post a comment.

 

More on This Topic

Evaluate This Page

How useful was this article?
(5 is extremely useful)

rate this a 1 rate this a 2 rate this a 3 rate this a 4 rate this a 5

Others have rated
this article: 4.8 / 5

discuss this topic

Post a comment

on Web Standards for Publishing Ventures

Abercrombie&Fitch
Ralph Lauren(Polo)
10deep hoody
bape hoody
christan audigier hoody
edhardy hoody
evisu hoody
googi hoody
kidrobot hoody
lrg hoody
parish hoody
Adidas hoody
Antkul Dodgen hoody
armani jean
artful dodger jean
bape jean
crown holder jean
dg jean
diesel jean
googi jean
edhardy jean
evisu jean
G-STAR jean
RMC jean
bape jean
true religion jean
affliction jean
christian audigier jean
edhardy jean
Versace jean
Abercrombie&Fitch t-shirt
Ralph Lauren(Polo) t-shirt
bape t-shirt
christan audigier t-shirt
edhardy t-shirt
evisu t-shirt
googi t-shirt
lrg t-shirt
Adidas t-shirt
Antkul Dodgen t-shirt
armani t-shirt
bape t-shirt
crown holder t-shirt
dg t-shirt
affliction t-shirt
football jersey
mlb
nfl
nba
nhl
Electronic
aeon
n81
n93
vertu
ipod touch
MK4/CHD

on Database Workers

The Tephritid Workers Database is a web based database collecting and sharing information on tephritid fruit flies, one of the most economically important group of insect species that threaten fruit and vegetable production and trade worldwide (McPheron & Steck 1996). Because these species are increasingly becoming important, a tremendous amount of information is made available each year: new technologies developed, new information on their biology and ecology; new control methods made available, new species identified, new outbreaks recorded and new operational control programmes launched.
===============================================
Sam
Link Building

on Online Libel Issues

Here are some good tips for avoiding online libel attacks:

http://michael-roberts-mile2-xellex-mile-2.com/Michael_Roberts_Mile2_Libel.html

on Writing and Editing a Blog

I was searching for blog editing and found this article to be helpful. People love bullets and lists in blogging. I also found an blog editing site that looks interesting as well http://www.quickpostedit.com where they charge for editing by the word more or less. If I didn’t have an editor for a girlfriend maybe I would use it. winkAs for the editing of comments I only every edit the curse words out, I think that if they have bad grammar that reflex poorly on them. My blog is primarily about marketing not editing so I don’t get to up tight.

on Polls and E-mail Surveys

why do we poll? well, just to know what most of the people wanted or like. just like if we make a poll about the candidacy of the next president of the United States, we will know who among the candidates are most loved by the people or who they want to rule them…
___________________

cutie_tech123
A team of successful entrepreneurs credited for http://www.SelectWealthSystem.com
A new home-based-business marketing system that provides the strategic high ground for internet marketing.
Pro Team Marketing uses an automated marketing system that is currently promoting a cutting-edge young company, entering the early growth stage, that targets the largest consumer base in the United States with their financial educational products.
http://www.SelectWealthSystem.com