Flash menu

hi i am using flah mx and i8 am wondering if somebody could help me creat the menu  whihc is on
the menu that when you click on the text suddenly therandom shape comes under it and it displays the submenus for each of the links it's hard to explain but the thing that i would like to set up is exacly on the site http://www.p-diddy.com/pd/
thank s
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Do you mean the different poses of people that show when you move the mouse over the main menu items?

That is quite simple to create. What they did do is put a movieclip with all these poses on the red menu thing. Every frame of that movieclip also includes a stop(); command so that only one pose shows and it doesn't play through.
Then on the mouseover state of the menu buttons all they do is change the frame that is currently showing in the poses movieclip.

the code would look something like this:

  _root.posesClip.gotoAndStop(2);  // this number of course would have to change depending on which button you add this code to.

The submenus again could also be a movieclip with a frame for each submenu. Though here you will have to add the code to the button instance:
on (release) {
  _root.submenuClip.gotoAndStop(2);  // again depending which button, change the frame number.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
balbinasukaAuthor Commented:
yes i that will help but not only i want to do that i would like to have those text links on top of the movie clip and
than whn i press on link the text will go bold red and then the red thing drags to it it like comes to it like slides toit exacly the same as on the http://www.p-diddy.com/pd/. just slidees to it and then stops exacly at the link and then it shows the diffrent sub menues
i don't care about the human figures all i would like is the menu system explained above the best example of that is http://www.p-diddy.com/pd/
also i am wondering if i could set something like
every time you come to the page it shows diffrent picture
let say
one time i go to my page and i see a picture of myself
then i close the browser and i go to the website agian and it show a picture of my sister
A random picture is easy:
make a movieclip with n frames then add this code in the first frame:

gotoAndStop(random(n));   //n being the number of frames

The bold red text is only a mouseover effect which can be solved when setting up the button.

To move the submenu to it's position you will need some actionscript. i'll set something up and get back to you
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

I made a sample that has such a movement in it. There's still a lot you can do to finetune it, but this is roughly it:


This is a site that will help you with equations to finetune the movement:

balbinasukaAuthor Commented:
that great stuff you made but just a question
how to i get diffrent links in diffrent buttons in the same red box
the movement is just what i wanted but the other thing
is that if you press btn1 it sees about me and home those two links
when btn2 pressed it sees e-mail and mice
when btn3 pressed it sees computers and software

balbinasukaAuthor Commented:
sorry for asking too much but i need to knwo few more things
can the red box drag with the links when i go through them at first so basically when i mouse over it the menu come under the text link but once i click on one of the links
i does the exacly the same thing as it's doing in your movie so it moves overe once you click not a mause over is the switch that i need to knwo from mouse over to onclick
and if the menu could disappear if i clicke outside
To your first question on showing the different subenus:
What you do is create a movieclip that contains the different submenus and when the menu button is clicked in addition to calling mc_submenu.gotoPosition(...) you also have to add this call: mc_submenu.submenu.gotoAndStop(2);  This of course assumes that the movieclip containing the submenus is placed inside the movieclip with the red bar and has the instance name submenu.

As for the start where the red bar just follows the mouse, this sample show how to detect the mousmovements:

What you do is something really similar where you only take the x coordinate of the mouse and move the red bar toward that x coordinate.

As to changing the the behaviors from one (follow mouse) to move to the menu and stay there until a next menu is clicked. Just use a global variable:

_global.followmouse = true;

The first time a menu button is clicked set this variable to false and have the mouse following code only execute if this variable is true.
balbinasukaAuthor Commented:
but i am gettin stuck on the swich can you perhaps give me some more hints
Do you have the code that makes the menu follow the mouse? If so add this somewhere in it to prevent the moving:

if (_global.followmouse) {
  // we want to follow the mouse in here

on each button you have the code:

on (release) {
  // we add this line
  _global.followmouse = false;   // as soon as a menu button is pressed we stop the mouse following

You have to see the variable _global.followmouse as a big flag that tells you whether you are still allowed to follow the mouse or not depending whether it is set to true or false;
balbinasukaAuthor Commented:
it gives me an error message
i doesn't work after i added the code to the menu.fla
i don't know why
it just stops and it doesn't even move when i click on it
I can't really help you if that is all the information you give me .....

Post the code, tell me what kind of error message you get, or post your fla and I'll have alook at it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.