Solved

Animated pull down menu buttons don't work

Posted on 2007-03-22
6
203 Views
Last Modified: 2010-04-03
I've created an animated pull down menu and while the animation is working swimmingly, I can't get any of my buttons to function correctly. I'm thinking it's because of the ActionScript that controls the movement of the pulldown is competing with the functionality of the button. Bottom line: I have no idea.

You can see what I'm talking about by going to http://www.specialpromotionsinc.com. The pull down menu is accessible by clicking on the "Country Showdown" link in the upper right hand corner. The buttons are revealed, but while I have them all programmed as buttons, you'll see how the whole area appears to be one big fat link.

Here's my code for the movie. What do I need to change in order for the buttons to function correctly?

Thanks!

on(rollOver){
      
      this.gotoAndPlay(2);
      
}

            
on(rollOut){
            this.gotoAndPlay(13);
}
0
Comment
Question by:brucegust
  • 4
  • 2
6 Comments
 
LVL 11

Expert Comment

by:sibgig
ID: 18774152
there are couple of things that could be happening. could you post the fla? i'd be happy to look at it.
0
 

Author Comment

by:brucegust
ID: 18774405
www.specialpromotionsinc.com/Home.zip

Thanks for your willingness to help...
0
 
LVL 11

Accepted Solution

by:
sibgig earned 500 total points
ID: 18775025
here you go:

http://www.tsquared.com/ee/home2.zip

removed actionscript from main time line on the movie clip

inside the movie clip on the main time line, made 'county showdown' and button
placed your rollover action there.

created an invisible button (rollout_but)

created a new layer for this button. this layer is behind your animation buttons. it is also larger than those buttons because once a user rolls onto this button (at which point they will be off any of the main buttons) this will trip the rollover action on the invisible button that tells the clip to move on and close.

i've commented out you get url and placed traces in each of those buttons for testing purposes

let me know if you have questions.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 11

Expert Comment

by:sibgig
ID: 18775042
i really should proof BEFORE hitting send

"inside the movie clip on the main time line, made 'county showdown' and button
placed your rollover action there."


should be:

inside the movie clips time line, made 'county showdown' a button and placed your rollover action there.
0
 

Author Comment

by:brucegust
ID: 18782397
I'm thinking we're gold.  Couple questions:

First off, I think I'm going to use what you've suggested. The reason I went with putting my commands to play and stop on the button's timeline is that it prevented the pull down from getting "stuck." By that I mean, if you move your mouse quickly over the pull down, sometimes it stalls and remains down when it should be returning to it's starting position.

What I had done was nowhere near as quality as what you've got here, but I was wondering if there was another measure that could be incorporated into your approach that would keep this thing from getting hung up. Also, on the button you have a command...

on (release) {
      //getURL("http://www.brucegust.com", "_blank");
      trace("trad");
}
 I'm not familiar at all with "trad." What is that?

Finally, you have the points. Thanks so much for your input. I've got another question that I've referenced below that I would welcome any input on.

Thanks!

http://www.experts-exchange.com/Software/Photos_Graphics/Web_Graphics/Macromedia_Flash/Q_22462293.html
0
 
LVL 11

Expert Comment

by:sibgig
ID: 18782789
i know what you mean. you can make the invisible button even bigger (giving more 'real estate' for the rollover action to be tripped) to try and avoid the menu from getting hung up. heck... its only on the one frame so you could make it fill the entire canvas if need be.

trace is a simple command that helps out in testing/debugging files. in this instance, if you were testing the movie locally, and you were to click on 'the traditional' button, you would see the 'output' window pop up and the word 'trad' would be there (trad was my lazy shorthand for 'traditional'). you'll notice i put traces in the other buttons as well. 'leg' for the legends buttons, 'work' for the 'how it works' button, and 'enter' for the 'how to enter' button. trace is a simple way of being able to check and see if a conditions exists, variables are updated or created, just about anything. read more about it here:
http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary808.html
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question