editorials discussion board

 
Books & Buyer's Guides

Information Hubs



Other Product Information

 

Site Supporters

Apple iPhone Prices At ...
Apple Store
Apple Store Canada
Cingular Wireless
iPhone InfoZone

Going Shopping?

Using the links above supports MacReviewZone!


send this page

Send to a friend



News Feed
Feed Information

Mailing list ... List information.


Latest Discussion Threads

MacReviewZone Gift Shop

Hard Cider: Little Things That Might Trip You Up - Troubleshooting Flash Button Problems
The Trouble with Buttons

By Jeff Peterson
Level - Beginner [assuming some familiarity with basic Flash features]

Buttons not working? There may be an easy solution.

Often in creating and previewing Flash documents, the buttons you have created work just fine, but when you publish them to the web, you find all sorts of troubles. You can’t select the button, or you can select it and press it, but the actions you expected don’t work. Try selecting the button on the left: you must get it exactly centered.

Press the Working Button to See Underlying Problems

Background:

Buttons are Symbols. They should look like squares with pointing fingers in your library:

<-- See the Icon?

If your "button" does not have this icon, then it is not a button symbol. If your object does not appear in the library at all, then you have not turned it into a symbol. Select the object and use the Convert to Symbol [F8] from the Insert Menu. Once the dialog box is opened, select "button" as type:

When you want to open a Button Symbol to edit it, there are several ways. You can select Options>Edit in the Library [above], double-click on the symbol on your movie layout, select the individual symbol from the upper right icon on the timeline, or you can control-click on the symbol for editing options.


When a button is ready to edit, you should see a timeline with 4 frames - Up, Over, Down, and Hit:

Before proceeding, make sure you have assigned an "Action" to the button instance, or the button will not do anything anyway. Did you double click on the button symbol and use the Action Tab [Flash 4], or Actions Panel [Flash 5], and assign an action for the button? {Note: you cannot click on the frame actions to assign an action to your button symbol. You must assign the action to the symbol instance itself.}

If you have followed all the procedures above and things are not working as expected, here are a couple of easy things to check.

Trouble 1: Button works fine in the Flash test area when you "enable" buttons on the timeline, but when you publish the Flash move to the web page, it is difficult to select the button.

Symptom: Mousing over the button causes brief flashes of a rollover effect, but it is almost impossible to actually select the button or click at the right time to get it to work.

Cause: "Hit Area" is too small — Enlarge it. (See first graphic)

Solution: Open up your library (command-L) and select your Button Symbol. Then from the Options menu in the Library, select Edit. Make sure that the "Hit" area in frame number 4 is large enough to cover the entire button area. I usually use a solid square and draw it over the entire visible area of the button to make sure it is covered. You can make it larger than the button, but then you may get an overlapping problem [see next problem]. It doesn’t make any difference what shape or color or text you use in frame 4, since the hit area is not visible. However, I usually use a solid, grouped object with no text.

Trouble 2: Buttons work in preview and on the timeline, but upon publish odd behaviors occur on mouse over, like one button rolling over when another button is pressed; or button selects with a mouse click but the action does not take place.

Cause:Overlapping hit areas in buttons. The invisible "hit" areas are larger than the visible buttons on the main timeline, and they overlap causing all sorts of odd behaviors, misfiring and non-working buttons.

Solution: Separate the buttons on the timeline or reduce the size of the hidden hit area. If the hit area is just a little larger than the visible button on the stage, separate the buttons a little more physically. If the hit area is too large for the button, edit the Button Symbol as above, but in reverse. Go to frame 4 and reduce the hit area to fit the visible button.

 


There are other problems with buttons, but often these problems are related to Action Scripting, a more advanced topic. If you select a button and use, for example, the "GoTo: URL" but select a non-existing web page, the button will not work. The problems here are so varied that you must know and be able to examine your specific action script to discover the problem.

Next: Sound Output Quality and Oddities in Flash Publish.

Jeff Peterson is a Macintosh pioneer, acquiring his first 128k Mac in 1984. In 1993, he started work on the Internet, producing an early e-magazine, O Theophilus, and educational courses for the web. He started his own web design company in 1999, www.PetersonSales.net and is still acquiring new clients. Jeff is also a part-time theologian, The Scholar's Corner, and he loves to play Flight Sims when he gets a chance, being part of the notorious Shadow Riders, call sign Padre =<SR>=.

©2000 by Jefferis Kent Peterson
www.PetersonSales.net
www.FlashTips.org

| Top of page | Mail this page to a friend |

Recent Additions

Dashboard Icon Check out our new dashboard widget tracking site updates and providing quick access to key areas of MacSpeedZone and MacReviewZone!

Reader Specials

firefox Firefox Search Plugins - search this site and others from within Firefox!

HandHelditems.com - Personalize your iPod with us. Shop hundreds of unique iPod accessories and save up to 80%.

Apple Store Apple Store - The size of a pack of gum, iPod shuffle weighs less than a car key. Which means there's nowhere your skip-free iPod shuffle can"t go. Click Here


Home Reviews Opinions & Articles Buyer's Guides MacSpeedZone

-->
Copyright 1996-2007 by Cider Press Publishing LLC all rights reserved. MacReviewZone is not authorized, sponsored, or otherwise approved by Apple Computer. Apple, the Apple logo, Macintosh, iPod, iBook, iMac, eMac, and PowerBook are registered trademarks of Apple Computer, Inc. Additional company and product names may be trademarks or registered trademarks and are hereby acknowledged.