Solved

Flash menu

Posted on 2003-10-26
13
160 Views
Last Modified: 2010-04-03
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
Comment
Question by:balbinasuka
  • 6
  • 5
13 Comments
 
LVL 5

Accepted Solution

by:
Calron earned 125 total points
ID: 9625384
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
 

Author Comment

by:balbinasuka
ID: 9627825
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
 
LVL 5

Expert Comment

by:Calron
ID: 9628128
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
 
LVL 5

Expert Comment

by:Calron
ID: 9629391
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
 

Author Comment

by:balbinasuka
ID: 9631265
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:balbinasuka
ID: 9631285
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
 
LVL 5

Expert Comment

by:Calron
ID: 9631911
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
 

Author Comment

by:balbinasuka
ID: 9637525
thanks
but i am gettin stuck on the swich can you perhaps give me some more hints
thankss
0
 
LVL 5

Expert Comment

by:Calron
ID: 9637617
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
 

Author Comment

by:balbinasuka
ID: 9639002
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
 
LVL 5

Expert Comment

by:Calron
ID: 9639883
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

747 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

13 Experts available now in Live!

Get 1:1 Help Now