-
http://www.flashkit.com/tutorials/Ac...-541/index.php
For the past 3 weeks I have been trying to learn how to do a drop down menu like the one in the example but the tutorial is to confusing to understand. If you could explain or even know of another example any help would be graciously appreciated.
-
let me see, I wrastled with this one a while back and with out looking at it for refresher...
NavBtn is set for "onRollOver" —› " MenuClip.***play() "
MenuClip tweens from 'nothing —› something' ... when it reaches 'something' ... have your various menu btn's exist on key frame at peak (stop) of tween (in MenuClip), (or pop-up in sequence on diff' frames)
NewLayer :::
ALSO :: add invisible btn. w/ hitSpot to cover visual area of menu panel(s)... then "trim - it" so it only responds on rollOver of edges...
HitSpot trim == create shape to just more than cover target , THEN, (on same layer/frame) overlay another shape just inside the bounds of the first and un-highlight then highlight again ... then delete it ( it erases the underlaying ) leaving you with a "boundry" type of HitSpot.
Code 'invisibleBtn' —› onRollOver —› "MenuClip.goAwayStuff" >
to tween back to invisability....
Three glasses of wine ... and I don't drink ... did It make sense ??
<>R<>
-
No, but you make more sense than the tutorial. I still need help relandr or any experienced flashers did you ever learn how to do this?
-
What part did you get and didn't get ???? ( need to know basis )
Ok ... what did I leave out...???
Drop-down menu has to be a 'movie-clip' and since you don't want it to 'show-up' untill called, it must contain a blank frame ' 1 ' with a 'stop' action for said frame, your 'call' btn will tell this clip to 'gotoAndPlay(2)'...and then it must stop @peak-of-tween frame.
( perhaps frame#12 for a 'one second' tween based on default timing)
add as many frames as it takes ( to menuClip ) to accomidate tweening the thang out and then back in (to invisible)
Whatever bkgrnd you have ( menu-panels ) have to be 'symbols' in order to tween right... and you can't tween diff' symbols on the same layer --- each must have its' own space !
Go crazy - add lots - o - frames... one fer everyBody !!!
ummmm, where was I ...hep me now... don-no where you lack (?)
I could go on indeff' but to no avail if'n you don't say where you still don't see ... Know what I mean....?
<>R<>
-
How do I turn this into actionscript?
//Frame 1
Comment : ::::::::: Our constants ::::::
Set Variable: "TotalRubs" = 7
We'll need the height of the rub so we get it
Set Variable: "RubHeight" = GetProperty ("Rub",_height)
Then we input now the label we want for each rub (assuming we've got 7)
Note that all values of them are character string with ""
Comment : -----------------------------------------------
Set Variable: "LabelRub1" = "I"
Comment : -----------------------------------------------
Set Variable: "LabelRub2" = "am"
Comment : -----------------------------------------------
Set Variable: "LabelRub3" = "learning"
Comment : -----------------------------------------------
Set Variable: "LabelRub4" = "to"
Comment : -----------------------------------------------
Set Variable: "LabelRub5" = "create"
Comment : -----------------------------------------------
Set Variable: "LabelRub6" = "awesome"
Comment : -----------------------------------------------
Set Variable: "LabelRub7" = "menu"
Set Variable: "SubrubHeight" = GetProperty ("Subrub",_height)
Comment : -----------------------------------------------
Set Variable: "Total_Subrubs_Rub1" = 2
Set Variable: "LabelRub1_Subrub1" = "Subrub1"
Set Variable: "LabelRub1_Subrub2" = "Subrub2"
Comment : -----------------------------------------------
Set Variable: "Total_Subrubs_Rub2" = 3
Set Variable: "LabelRub2_Subrub1" = "Subrub1"
Set Variable: "LabelRub2_Subrub2" = "Subrub2"
Set Variable: "LabelRub2_Subrub3" = "Subrub3"
Comment : -----------------------------------------------
Set Variable: "Total_Subrubs_Rub3" = 5
Set Variable: "LabelRub3_Subrub1" = "Subrub1"
Set Variable: "LabelRub3_Subrub2" = "Subrub2"
Set Variable: "LabelRub3_Subrub3" = "Subrub3"
Set Variable: "LabelRub3_Subrub4" = "Subrub4"
Set Variable: "LabelRub3_Subrub5" = "Subrub5"
Comment : -----------------------------------------------
Set Variable: "Total_Subrubs_Rub4" = 4
Set Variable: "LabelRub4_Subrub1" = "Subrub1"
Set Variable: "LabelRub4_Subrub2" = "Subrub2"
Set Variable: "LabelRub4_Subrub3" = "Subrub3"
Set Variable: "LabelRub4_Subrub4" = "Subrub4"
Comment : -----------------------------------------------
Set Variable: "Total_Subrubs_Rub5" = 2
Set Variable: "LabelRub5_Subrub1" = "Subrub1"
Set Variable: "LabelRub5_Subrub2" = "Subrub2"
Set Property ("Rub", Visibility) = 0
Set Property ("Subrub", Visibility) = 0
Comment : ::::::::: Dupplicating part ::::::
let's always initialize our counter before "Loop" action :
Set Variable: "n" = 0
Do actions in loop as many time as our "TotalRubs" var
Loop While (nDO NOT FORGET to increase our counter !
Set Variable: "n" = n+1
Our var ("PosY") must be "dynamic" because there will be a different one for each rub.you must fill three parameters (target, new name, depth).
Duplicate Movie Clip ("Rub", n, n*10)
We'll see later more about this "if condition"
If (n=1)
We define here the future position of our dupplicated movies
Set Variable: "YPosition" = 30
Else
Set Variable: "YPosition" = GetProperty (n-1, _y) + RubHeight
End If
At last, we set our "YPosition" var to our dupplicated movie
Set Property (n, Y Position) = YPosition
We set the corresponding label for each rub dupplicated
Set Variable: n&":Label" = eval ("LabelRub"&n)
End Loop
We don't need the original Rub MC, so we set to him an invisibility.
Set Property ("Rub", Visibility) = 0
//Frame 2
Set Variable: "n" = 0
Loop While (n Our var ("PosY") must be "dynamic" because there will be a different one for each rub.
The origine pos for a rub (where distance = 0) will be equal to the rub selected + the height of a rub
Set Variable: "PosY"&n = GetProperty (n,_y)+RubHeight
During the loop, one of the rubs (n) corresponds to the one selected...
If it's the case...
If (TargetRub = n)
Comment : --------------- subrub part ---------
We begin the same loop but for subrubs (z ---> units)
Set Variable: "z" = 0
Loop While (zHere, var TargetRub and var n have the same value (see if condition) !
Duplicate Movie Clip ("Subrub",TargetRub&"_"&z,(TargetRub*10)+z)
Then, like for rubs placement, we place subrub regards with the previous one.
And if it's the first subrub, its yposition will be regard to the corresponding rub.
If (z=1)
Set Variable: "YPosition" = GetProperty(n,_y)+(RubHeight/2)+(SubrubHeight/2)
Else
Set Variable: "YPosition" = GetProperty (TargetRub&"_"&(z-1),_y)+SubrubHeight
End If
Set Property (TargetRub&"_"&z, Y Position) = YPosition
We set the corresponding label depending of current n and current z.
We have 2 loops so we ALWAYS have a different couple of numbers.
Set Variable: TargetRub&"_"&z&":Label" = eval ("LabelRub"&n&"_Subrub"&z)
End Loop
we are able to estimate how many place will take all the subrubs for this rub
Set Variable: "MaxDistance" = eval ("Total_Subrubs_Rub"&TargetRub)*SubrubHeight
Comment : -----------------------------------------------
Now, we increase Distance
Set Variable: "Distance"&n = eval ("Distance"&n)+5
But if this one> place taken by subrubs, we stop to increase Distance var
If (eval ("Distance"&n)>=MaxDistance)
Set Variable: "Distance"&n = MaxDistance
End If
If current n is not equal to the rub selected (all other rubs)
Else
Comment : --------------- subrub part ---------
We reverse loop to remove dupplicated subrubs if there were
Set Variable: "z" = 10
Loop While (z>0)
Set Variable: "z" = z-1
Remove Movie Clip (n&"_"&z)
End Loop
Comment : -----------------------------------------------
Then we decrease Distance until this equal 0.
Set Variable: "Distance"&n = eval ("Distance"&n)-10
If (eval ("Distance"&n)<=0)
Set Variable: "Distance"&n = 0
End If
End If
At last, we set to each rub + 1 the corresponding y position.
Set Property (n+1, Y Position) = eval ("PosY"&n)+eval ("Distance"&n)
End Loop
//how do you convert it to actionscript
Set Variable: "URL_Rub1" = "http://www.montfort-sa.fr"
This is syntax for rubs, do this for all rub you want URL
Probably no URL if there are subrubs for this :-)
Set Variable: "URL_Rub2" = "http://www.adresse2.com"
Set Variable: "URL_Rub3" = "http://www.adresse3.com"
etc.
now the syntax for URL for subrubs :
Set Variable: "URL_Rub1_Subrub1" = "http://www.montfort-sa.fr"
Set Variable: "URL_Rub1_Subrub2" = "http://www.montfort-sa.fr"
etc...
Right now, always in the first keyframe you've note that we dupplicated our rubs (subrubs are dupplicated or remove in second one). So under the line that send the right label to each rubs, we'll insert the URL line :
...
Set Property (n, Y Position) = YPosition
Set Variable: n&":Label" = eval ("LabelRub"&n)
Set Variable: n&":URL" = eval ("URL_Rub"&n)
End Loop
...
For the subrubs now, so in second keyframe :
...
Set Property (TargetRub&"_"&z, Y Position) = YPosition
Set Variable: TargetRub&"_"&z&":Label" = eval ("LabelRub"&n&"_Subrub"&z)
Set Variable: TargetRub&"_"&z&":URL" = eval ("URL_Rub"&TargetRub&"_Subrub"&z)
End Loop
...
Our buttons (rubs & subrubs) need to have any "get URL" action to apply our vars...Set this action to your rub button and your sub rub button :
On (Release)
Get URL (URL)
End On
-
I would really like ot find a working example because it would speed up the learning curve.
-
-
Personally I dont like this menu very much. It is awkuard to access the menu just below. It goes away from my mouse when roll over.
I can give a working example. It is written in Flash 5, so the script syntax might be better to read.
However, my fla wont help you to understand that tutorial. I believe the structure of my fla is different from that. And I dont have comments in the script, so it is a bit difficult to understand.
http://dr_ericlin.tripod.com/forum/menus5.html
http://dr_ericlin.tripod.com/forum/menu5.zip
-
Thanks ericlin for your help but I can't download the zip I get this message
This file is hosted by Tripod, a Lycos®Network Site, and is not available for download. Please check out Tripod's Help system for more information about Remote Loading and our Remote Loading policy.
-
To download, click that link and select save target as ...
-
i tried that but it still does not download? It saves a copy of the link on my desktop when I click on the icon it loads the Tripod, a Lycos®Network Site, and says is not available for download.
-
try:
http://www.geocities.com/~dr_ericlin/aaa/menu5.zip
If the link still fails,
Email me, I'll send it to you.
ericlin@ms1.hinet.net
-
ericlin Thank you Thank you Thank you how could I ever repay you. Everything Worked I was able to download the file. Without your help I don't know what I would of done. Your help and time is very much appreciated.
-
Senior Member
Thanks for that as well ericlin I dunno how many people have tryed to make that menu, and me too found it to complicated and it was such a pitty the guy didn't leave a fla in the tut. You outta put a updated MX version of it on flashkit tutorial.
Well done nicely coded.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|