Question

Animated horizontal pop-out menu or Slide-out menu...

Asked by: kearnguy

Hello Experts.

I have been studying aScripting for a few months now and I am trying to progress to more advanced stuff.  I have a site I am developing and need some help with the menu.

What I want is a menu that is not visible all the time - it is hidden behing another graphic.  It should only be visible when the mouse is over specific coordinates.  Also, the menu should animate "slidinging out" horizontaly, not "drop down".  A traditional drop down menu will not work for this.  Furthermore, when the mouse is no longer in the set coordinates, the menu should animate sliding back behind another graphic.  Simply "disappearing" will not work for the overall site look.

I have tried to use an approach with hitTest on a movieClip, but it doesn't work.  I believe its because the hitTest is on the clipEvent of onEnterFrame, which means that it keeps looping.  I tried to do something with attachMovie too, but have no idea what happened in that experiement. :0)

I could probably figure it out eventually, but don't have the time due to other deadlines...so I turn to you!  Come on now, you all haven't let me down yet!
Let me know if you need clarification.

Thanks in advance.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2005-01-22 at 12:44:31ID21284622
Tags

horizontal

,

slide

,

out

,

slidinging

Topic

Adobe Flash

Participating Experts
3
Points
500
Comments
14

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. PPT97 - animation each time i go to slide
    I am building a multimedia kiosk for a business. I want the presentation to wait at the opening until someone plays with it. Then after lets say 10-15 min, the presentation resets and goes back to the first slide. What i want to know is if it is possible to force a slide to a...
  2. Combining multiple PowerPoint slides into one (with animati…
    Because of bureaucracy I have a limited number of slides that I’m allowed in my presentation. I need to show some complicated calculations that I’m trying to make understandable by animation and such. Right now I have this section of calculation at around 10 slides. I reall...
  3. Slide animation on click on object
    I want to create an object in a PowerPoint slide that, once clicked, will make the slide animation go on. That is, I don't like that the animation goes on when I click wherever on the slide. Important: I know that I can move to another slide when I click on a particular objec...
  4. repeat animations on a slide when revisited
    Hi Guys, I have an old touchscreen computer which I am trying to set up an interactive presentation for as I figured with my current ability I better just use powerpoint! Anyway I have set up most of it, it uses hyperlinks to navigate from slide to slide. I have included...
  5. Does PowerPoint 2007 now have the ability to print slide…
    According to the following URL, animations do not print out as they are viewed via the Show Slide section. http://skp.mvps.org/cshow.htm Has PowerPoint 2007 been updated to be able to break out those slides in a way when they are printed to PDF or any other form that they c...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: Demon1sPosted on 2005-01-22 at 17:13:46ID: 13113356

how about an on(over) event on the slideout movieclip?(i'm not exactly sure what its called, i get confused between the component behaviers and regular ones, so that is probably wrong but if you type on or onclipevent or whateverm it should give you a dropdown with the options)

this isnt really related to what you want, but it has the on mouseover effects that you will need: http://www.flashkit.com/movies/Interfaces/Menus/Retracti-Jonathan-2382/index.php

 

by: vickerleungPosted on 2005-01-23 at 04:12:00ID: 13114631

kearnguy,

I think you can simply put an invisible button at your specific coordinates
And apply the onRollOver and onRollOut is good enough
Name the button as inv_button

You can make a menu movieclip in this way

From frame 1 to frame 10, the menu slide out using simply motion tween
On Frame 10, add a stop ();
From frame 10 to frame 20, the menu slide in using simply motion tween again

Drag the menu mc to stage and name it sliding_menu

apply the scripts to the root movie

_root.inv_button.onRollOver = function ()
{
     _root.sliding_menu.gotoAndPlay (1);
}

_root.inv_button.onRollOut = function ()
{
     _root.sliding_menu.gotoAndPlay (10);
}

Cheers :)
Vicker

 

by: kearnguyPosted on 2005-01-24 at 05:39:46ID: 13121236

Vicker,

I'll try this and see what the results are.  The only problem I can see having with this is:  if the user rolls over and rolls out before the tween gets to frame 10, the tween will jump to 10 and then slide back in.  This could create a little hicup in the smooth sliding transition.  A little problem, but when the site "look" is a primary concern to the client, it could turn into a big problem. :)

Like I said though, I'll give it a try and let you know if it does what I need.

Thanks.

 

by: kearnguyPosted on 2005-01-24 at 07:20:06ID: 13122156

Ok...

So I tried the invisible button approach.  It works pretty well (except for the above mentioned glitch), but it all goes to crap when I put menu buttons in the equation.  The invisible button is placed, and when you hover over it the sliding movieClip comes out.  When you hover off it, the movieClip slides back in.  But remember I need this for a menu.  So when I add buttons to the end of the "sliding in", and you hover over one of them, my movieClip and buttons disappear.  I believe this has something to do with the fact that Flash no longer thinks you are hovering over the invisible button - you're over a different button.  Any thoughts?

I'm pretty sure we could solve this if we could use mouse coordinates versus an invisible button.  I'm just not sure how to approach that.  Keep the ideas coming :0)

 

by: fixitbenPosted on 2005-01-24 at 21:31:54ID: 13128730

Check out this site at the bottom where options are look at the menus there.  Is this something that you are looking for.  The animations can be anything mine are just simple tweens though.

http://theyac.org/indexhigh.html

If so I can show you how I did this with a hit test.  

An invible buttons don't really work on roll out menus cause then the button that you have in the menu is blocked by the invisble button.  So if this is what you are looking for just let me know

Fixitben

 

by: vickerleungPosted on 2005-01-24 at 21:40:36ID: 13128749

kearnguy,

Actually this issue is not a difficult one to solve :)

The solution is as the following

On frame 10, instead of a stop, put the following

if (this.continue_flag == 1)
{
     play ();
}
else
{
     stop ();
}

And for the buttons

_root.inv_button.onRollOver = function ()
{
     _root.sliding_menu.continue_flag = 0;
}

_root.inv_button.onRollOut = function ()
{
     _root.sliding_menu.continue_flag = 1;
     _root.sliding_menu.play ();
}

So when user roll in -> slide out -> flag 0 -> frame 10 -> stop -> roll out -> play -> slide in
The other case roll in -> slide out -> roll out -> flag 1 -> frame 10 -> play -> slide in

Cheers :)
Vicker

 

by: kearnguyPosted on 2005-01-25 at 16:40:55ID: 13138098

Alright,

this is some good script.  It actually helps me with another problem I had.  However, it doesn't solve one of the main problems.  When I hover over the invisible button, the new menu pops up fine.  But as soon as I rollOver the hit area of one of the menu buttons, the menu closes.

Fixitben!  The functionality of the menu on that link is what I am looking for.  Please let me know how you did it.  Its a vertical drop down, but I'm sure I can modify it to be a horizontal.

Keep up the good work everyone.

 

by: vickerleungPosted on 2005-01-25 at 19:04:02ID: 13138759

OK kearnguy

To solve your first problem, you can do a trick here

// Add this new function
function raise_flag ()
{
     _root.sliding_menu.continue_flag = 1;
     _root.sliding_menu.play ();
     clearInterval (_root.interval_id);
}

_root.inv_button.onRollOver = function ()
{
     _root.sliding_menu.continue_flag = 0;
}

_root.inv_button.onRollOut = function ()
{
     // call the new function after 5 seconds
     _root.interval_id = setInterval (raise_flag, 5000);
}

And then for the sliding menu, add the following

_root.sliding_menu.onRollOver = function ()
{
     clearInterval (_root.interval_id);
}

_root.sliding_menu.onRollOut = function ()
{
     _root.interval_id = setInterval (raise_flag, 5000);
}

So the result will be

roll in -> slide out -> flag 0 -> frame 10 -> stop -> roll out -> 5 sec -> play -> slide in
roll in -> slide out -> roll out -> flag 1 -> frame 10 -> 5 sec -> play -> slide in
roll in -> slide out -> roll out -> flag 1 -> frame 10 -> 5 sec -> roll in menu -> stop 5 sec -> roll out menu -> 5 sec -> play -> slide in

I hope it works~~

Vicker :)

 

by: fixitbenPosted on 2005-01-25 at 19:34:41ID: 13138883

basically create a movie clip and on one layer place the image that you are using as the button then on the other layer.  Place a motion tween of what ever you want the menu to be with out the buttons in the menu yet.  add the tween then open up the tweened part and place all the buttons that are in the menu in there.  That way they are place inside the object that is being tweened.  Then place the movie clip on the main stage and then place this code on the movie clip.  

onClipEvent (enterFrame) {
   
     if (this.hitTest(_root._xmouse, _root._ymouse, true) ) {
          this.nextFrame();
     } else {
          this.prevFrame();
     }
}


Here is a very simple example I had to do this remotely cause the comp I am on didn't have flash so if you need a better example just let me know.  But this is just to give you the idea of what you can do.
http://theyac.org/experts/menu.fla

Fixitben

 

by: kearnguyPosted on 2005-01-31 at 11:54:46ID: 13185970

Just an update...

Sorry for not responding for so long.  I have been swamped with work.  I will get back to this by Thursday...(cross your fingers).  I'll let you all know what works.

Thanks for all your help.

kearnguy

 

by: kearnguyPosted on 2005-02-09 at 15:50:36ID: 13270663

Well, I have tried this both ways and still can't get it to work.

Vicker, could you consolidate all the code you have presented into one concise post.  I may just be implementing it wrong. :0)

Fixitben, for some reason I can't get to the link you provided.  Can you check it for me and see if it is still working?

Thanks everyone.  I know we are getting close...I can feel it.

 

by: kearnguyPosted on 2005-02-09 at 15:51:58ID: 13270674

Correction...

Fixitben, I can download the file from the link, but it won't open in MX.  Any thoughts?

 

by: fixitbenPosted on 2005-02-09 at 18:11:12ID: 13271404

Ok try the file again I made it for mx so it should open

Fixitben

 

by: kearnguyPosted on 2005-02-16 at 09:23:51ID: 13326372

Hey everyone...

Going out of town on biz.  I will be back Tuesday.  I'll check out the new file then Fixitben.  Thanks everyone for your help.

We'll get this wrapped up when I get back!

kearnguy

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...