Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing "hit" state on button dynamically??? 1

Status
Not open for further replies.

khatharr

Programmer
Mar 1, 2007
4
0
0
US
Hello, everyone. I'm learning flash by reading some manuals, but I'm running into some problems with a project that I'm trying to do.

What I'm basically trying to make is a navigation bar that will sit on the left side of the page. This is simple enough, but I want a specific effect that's not seeming to work out the way I want it to after several attempts.

What I'd like is to have a 'category' button that on the mouseover will expand outward to the right and then a list of items within that category will slide out downward from it.

Where I'm having difficulty is in two things:

First, when the button expands I can change the graphic easily, but the shape of the "hit" state needs to change as well so that the button doesn't collapse when the user goes to pick an item from the list. I have no idea how to accomplish this. :(

Secondly, I've noticed that the animation that I have set to execute on the mouseover plays fine, and clicking the button is fine, but when I release the button the animation replays. What I want it to do is basically remain expanded as long as the mouse is over it regardless of clicking and contract nicely instead of just plain "snapping" back to the normal state when the mouse leaves.

I'm beginning to think that maybe I need to learn a lot of AS and use a movie-clip instead of a button???

Anyways, I'll keep searching through my documentation and stay on this. Any advice or shared experience would be greatly appreciated. I really want to learn all there is to learn about Flash and Action Script, so I'm more than willing to experiment and more than willing to learn.

Thank you for reading this, and thanks in advance for any response.
 
Okay. Sorry it took me so bloody long to post. I have very limited internet access. The link to my current fla is:


It's a single button. There would be a stack of them in the final navbar.

It ain't much, but it's my first foray into flash, so please don't laugh at my n00bity. ;)
 
You can't do it that way...

Scrap your button and only use a hitTest on the ButtExpandMC itself (the code is on the clip and commented...)

You'll find your corrected .fla in this thread started for you on Webwasp...


You may need to register to be able to download the .fla, I'm not sure!

Regards. COMING SOON - Web Design

TO GET YOUR OWN FREE WEBSITE HOSTING
 
Firstly I'd like to thank you very much, oldnewbie. I think I understand what you're saying, and I'm very grateful for the time you've put into this.

I did try to download the .fla you posted, but the RNG image on webwasp registration page won't appear on any of my computers using any browser, so I can't register to download.

If it's possible, I would sincerely appreciate it if you (or anyone) could post the .fla on megaupload.com or a similar service. I fully understand if you feel you've already spent enough time on this, and I'll take a shot at implementing this myself in the meantime.

Either way, thanks again! I was hoping for a hint or two, but you went above and beyond my expectations. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top