Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

Flash menu

hi i am using flah mx and i8 am wondering if somebody could help me creat the menu  whihc is on
http://www.p-diddy.com/pd/
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
0
balbinasuka
Asked:
balbinasuka
  • 6
  • 5
1 Solution
 
CalronCommented:
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.
}
0
 
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
0
 
CalronCommented:
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
stop();

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
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
CalronCommented:
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:

www.lauchenauer.info/menu.fla


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

http://www.robertpenner.com/easing/
0
 
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
meaning
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
thanks

0
 
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
thanks
0
 
CalronCommented:
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:
http://www.flashkit.com/movies/Animations/Other/Compass_-Navy-2111/index.php

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.
0
 
balbinasukaAuthor Commented:
thanks
but i am gettin stuck on the swich can you perhaps give me some more hints
thankss
0
 
CalronCommented:
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
  mc_submenu.gotoPosition(n);
}

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;
0
 
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
0
 
CalronCommented:
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.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now