Solved

Animated pull down menu buttons don't work

Posted on 2007-03-22
6
176 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now