# Flashmx Dynamic Tree Menu

**URL:** <https://forum.kirupa.com/t/flashmx-dynamic-tree-menu/56400>\
**Category:** flash\
**Created:** [July 3, 2004, 8:14pm UTC](https://forum.kirupa.com/t/flashmx-dynamic-tree-menu/56400 "2004-07-03T20:14:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom\_s](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@tom\_s](https://forum.kirupa.com/u/tom_s)\
**Post date:** [July 3, 2004, 8:14pm UTC](https://forum.kirupa.com/t/flashmx-dynamic-tree-menu/56400/1 "2004-07-03T20:14:25Z")

</div>

hi everyone!  
i read about dynamic menu in [http://www.flashkit.com/tutorials/Actionscripting/Expert/Very\_Hig-\_Da-541/index.php](http://www.flashkit.com/tutorials/Actionscripting/Expert/Very_Hig-_Da-541/index.php)

and think its really awesome menu!!!  
i stucked get to do menu like this ,i’m using flashmx 2004  
i get confused in action script code posted there, and didnt get further to continue building  
i really apreciated if somebody can explain to me how to do it

thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 4, 2004, 10:26am UTC](https://forum.kirupa.com/t/flashmx-dynamic-tree-menu/56400/2 "2004-07-04T10:26:58Z")

</div>

anyone ?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 4, 2004, 1:02pm UTC](https://forum.kirupa.com/t/flashmx-dynamic-tree-menu/56400/3 "2004-07-04T13:02:50Z")

</div>

actually i know how to do , all the parts in this tutorial but , my problem is scripting , i copy and paste the code, like he write it but it wont work , after few hours, sitting and trying to separate script and combing together , nothing, nothing…and i really lame in AS part , so i would really , really grateful if someone explain it , the AS …thanks again :rambo:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 4, 2004, 1:05pm UTC](https://forum.kirupa.com/t/flashmx-dynamic-tree-menu/56400/4 "2004-07-04T13:05:59Z")

</div>

ok here is the AS for the main scene , layer ,

[COLOR=Blue]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”

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[/COLOR]

but my FLASHMX 2004 , trace the mistakes…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 4, 2004, 5:57pm UTC](https://forum.kirupa.com/t/flashmx-dynamic-tree-menu/56400/5 "2004-07-04T17:57:32Z")

</div>

That looks like psuedo code to me… not actual actionscript.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 5, 2004, 5:15pm UTC](https://forum.kirupa.com/t/flashmx-dynamic-tree-menu/56400/6 "2004-07-05T17:15:41Z")

</div>

yes Dunga you right , i try to to sort it , but i’m not good in AS ☹
