# How to customize Relevare navigation menu

**URL:** <https://forum.kirupa.com/t/how-to-customize-relevare-navigation-menu/195366>\
**Category:** Uncategorized\
**Created:** [July 31, 2006, 6:27am UTC](https://forum.kirupa.com/t/how-to-customize-relevare-navigation-menu/195366 "2006-07-31T06:27:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![insultcomidog](https://avatars.discourse-cdn.com/v4/letter/i/ac91a4/32.png) [@insultcomidog](https://forum.kirupa.com/u/insultcomidog)\
**Post date:** [July 31, 2006, 6:27am UTC](https://forum.kirupa.com/t/how-to-customize-relevare-navigation-menu/195366/1 "2006-07-31T06:27:48Z")

</div>

**[COLOR=black][FONT=Verdana]How to customize Relevare navigation menu…[/FONT][/COLOR]**

[COLOR=black][FONT=Arial]This navigation menu was originally used on [[COLOR=#800080]http://www.relevare.com/site/[/COLOR]](http://www.relevare.com/site/) .[/FONT][/COLOR]

[COLOR=black][FONT=Arial]I got the source code from [[COLOR=#800080]http://laco.wz.cz/tween/?page=examples[/COLOR]](http://laco.wz.cz/tween/?page=examples) , under the [relevare.com](http://relevare.com) navigation link. I’ve attached the [/FONT][/COLOR][COLOR=black][FONT=Arial]fla[/FONT][/COLOR][COLOR=black][FONT=Arial] and xml with this post.[/FONT][/COLOR]

[COLOR=black][FONT=Arial]I’ve managed to customize the labels for each box in the xml file, but can’t figure out how to put content like jpgs, swfs or even text in the boxes.[/FONT][/COLOR]

[COLOR=black][FONT=Arial]I’ve spent hours googling for tutorials on this without any luck. The company Relevare has ceased trading. The laco board doesn’t offer support for this example. There are a couple threads about this menu on Kirupa, but none of them say anything about customization.[/FONT][/COLOR]

[COLOR=black][FONT=Arial]This is a nifty menu I’d like to be able to customize. Any help would be much appreciated.[/FONT][/COLOR]

[COLOR=black][FONT=Arial]ActionScript Code:  
[FONT=Courier New][LEFT][COLOR=#808080]_#include “lmc\_tween\_as1.as”\</p\>_[/COLOR]  
\<p\>initCOLOR=#000000[/COLOR];\</p\>  
\<p\>\_global.[COLOR=#000080]out[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]trace[/COLOR]COLOR=#000000[/COLOR];\</p\>  
\<p\>[COLOR=#000000]}[/COLOR];\</p\>  
\<p\>function initCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]data[/COLOR] = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];\</p\>  
\<p\> srcfile = [COLOR=#ff0000]“menu.xml”[/COLOR];\</p\>  
\<p\> loadXMLCOLOR=#000000[/COLOR];\</p\>  
\<p\>[COLOR=#000000]}[/COLOR]\</p\>  
\<p\>function loadXML[COLOR=#000000]([/COLOR]file, [COLOR=#0000ff]data[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#000000] **var** [/COLOR] source\_xml = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000ff]XML[/COLOR]COLOR=#000000[/COLOR];\</p\>  
\<p\> [COLOR=#000000] **var** [/COLOR] th = [COLOR=#0000ff]this[/COLOR];\</p\>  
\<p\> source\_xml.[COLOR=#0000ff]ignoreWhite[/COLOR] = [COLOR=#000000] **true** [/COLOR];\</p\>  
\<p\> source\_xml.[COLOR=#0000ff]onLoad[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> th.[COLOR=#000080]parseXMLNode[/COLOR]COLOR=#000000[/COLOR];\</p\>  
\<p\> th.[COLOR=#000080]buildMenu[/COLOR][COLOR=#000000]([/COLOR]th.[COLOR=#000080]main\_mc[/COLOR], [COLOR=#0000ff]data[/COLOR][COLOR=#000000])[/COLOR];\</p\>  
\<p\> [COLOR=#000000]}[/COLOR];\</p\>  
\<p\> source\_xml.[COLOR=#0000ff]load[/COLOR]COLOR=#000000[/COLOR];\</p\>  
\<p\>[COLOR=#000000]}[/COLOR]\</p\>  
\<p\>function parseXMLNode[COLOR=#000000]([/COLOR]node, data\_arr[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000] **var** [/COLOR] i = [COLOR=#000080]0[/COLOR]; i\<node.[COLOR=#0000ff]childNodes[/COLOR].[COLOR=#0000ff]length[/COLOR]; i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#000000] **var** [/COLOR] n = node.[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR];\</p\>  
\<p\> [COLOR=#000000] **var** [/COLOR] nodeObj = [COLOR=#000000]{[/COLOR][COLOR=#000000]}[/COLOR];\</p\>  
\<p\> [COLOR=#0000ff]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000] **var** [/COLOR] j [COLOR=#0000ff]in[/COLOR] n.[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]switch[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]case[/COLOR] [COLOR=#ff0000]“label”[/COLOR] :\</p\>  
\<p\> [COLOR=#808080]_//trace(n.childNodes[j].nodeType)\</p\>_[/COLOR]  
\<p\> nodeObj.[COLOR=#000080]label[/COLOR] = n.[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR]j[COLOR=#000000]][/COLOR].[COLOR=#0000ff]firstChild[/COLOR].[COLOR=#0000ff]nodeValue[/COLOR];\</p\>  
\<p\> [COLOR=#0000ff]break[/COLOR];\</p\>  
\<p\> [COLOR=#0000ff]case[/COLOR] [COLOR=#ff0000]“data”[/COLOR] :\</p\>  
\<p\> nodeObj.[COLOR=#0000ff]data[/COLOR] = n.[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR]j[COLOR=#000000]][/COLOR].[COLOR=#0000ff]firstChild[/COLOR].[COLOR=#0000ff]nodeValue[/COLOR];\</p\>  
\<p\> [COLOR=#0000ff]break[/COLOR];\</p\>  
\<p\> [COLOR=#0000ff]case[/COLOR] [COLOR=#ff0000]“subitems”[/COLOR] :\</p\>  
\<p\> nodeObj.[COLOR=#000080]subitems[/COLOR] = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];\</p\>  
\<p\> parseXMLNode[COLOR=#000000]([/COLOR]n.[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR]j[COLOR=#000000]][/COLOR], nodeObj.[COLOR=#000080]subitems[/COLOR][COLOR=#000000])[/COLOR];\</p\>  
\<p\> [COLOR=#0000ff]break[/COLOR];\</p\>  
\<p\> [COLOR=#000000]}[/COLOR]\</p\>  
\<p\> [COLOR=#000000]}[/COLOR]\</p\>  
\<p\> data\_arr.[COLOR=#0000ff]push[/COLOR]COLOR=#000000[/COLOR];\</p\>  
\<p\> [COLOR=#000000]}[/COLOR]\</p\>  
\<p\>[COLOR=#000000]}[/COLOR]\</p\>  
\<p\>function buildMenu[COLOR=#000000]([/COLOR]timeline, [COLOR=#0000ff]data[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#808080]_//\</p\>_[/COLOR]  
\<p\> [COLOR=#0000ff]level[/COLOR] = [COLOR=#000080]0[/COLOR];\</p\>  
\<p\> pagew = [COLOR=#000080]100[/COLOR];\</p\>  
\<p\> pageh = [COLOR=#000080]100[/COLOR];\</p\>  
\<p\> positions = [COLOR=#000000][[/COLOR][COLOR=#000000]{[/COLOR]x:[COLOR=#000080]2[/COLOR], y:[COLOR=#000080]2[/COLOR][COLOR=#000000]}[/COLOR], [COLOR=#000000]{[/COLOR]x:[COLOR=#000080]2[/COLOR], y:[COLOR=#000080]1[/COLOR][COLOR=#000000]}[/COLOR], [COLOR=#000000]{[/COLOR]x:[COLOR=#000080]1[/COLOR], y:[COLOR=#000080]2[/COLOR][COLOR=#000000]}[/COLOR], [COLOR=#000000]{[/COLOR]x:[COLOR=#000080]1[/COLOR], y:[COLOR=#000080]1[/COLOR][COLOR=#000000]}[/COLOR], [COLOR=#000000]{[/COLOR]x:[COLOR=#000080]0[/COLOR], y:[COLOR=#000080]2[/COLOR][COLOR=#000000]}[/COLOR], [COLOR=#000000]{[/COLOR]x:[COLOR=#000080]0[/COLOR], y:[COLOR=#000080]1[/COLOR][COLOR=#000000]}[/COLOR], [COLOR=#000000]{[/COLOR]x:[COLOR=#000080]2[/COLOR], y:[COLOR=#000080]0[/COLOR][COLOR=#000000]}[/COLOR][COLOR=#000000]][/COLOR];\</p\>  
\<p\> [COLOR=#808080]_//\</p\>_[/COLOR]  
\<p\> timeline.[COLOR=#0000ff]setMask[/COLOR]COLOR=#000000[/COLOR];\</p\>  
\<p\> [COLOR=#808080]_//\</p\>_[/COLOR]  
\<p\>&nbsp;\</p\>  
\<p\> timeline.[COLOR=#000080]destx[/COLOR] = timeline.[COLOR=#000080]desty[/COLOR]=[COLOR=#000080]10[/COLOR];\</p\>  
\<p\> timeline.[COLOR=#000080]desth[/COLOR] = timeline.[COLOR=#000080]destw[/COLOR]=[COLOR=#000080]300[/COLOR];\</p\>  
\<p\> [COLOR=#808080]_//\</p\>_[/COLOR]  
\<p\> timeline.[COLOR=#000080]label[/COLOR] = [COLOR=#ff0000]“perceptive planning”[/COLOR];\</p\>  
\<p\> timeline.[COLOR=#000080]bg\_mc[/COLOR].[COLOR=#0000ff]onPress[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> main\_mc.[COLOR=#000080]tween[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]"\_width"[/COLOR], [COLOR=#ff0000]"\_height"[/COLOR], [COLOR=#ff0000]"\_x"[/COLOR], [COLOR=#ff0000]"\_y"[/COLOR][COLOR=#000000]][/COLOR], [COLOR=#000000][[/COLOR][COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]\_parent[/COLOR].[COLOR=#000080]destw[/COLOR], [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]\_parent[/COLOR].[COLOR=#000080]desth[/COLOR], [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]\_parent[/COLOR].[COLOR=#000080]destx[/COLOR], [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]\_parent[/COLOR].[COLOR=#000080]desty[/COLOR][COLOR=#000000]][/COLOR], [COLOR=#000080]1[/COLOR][COLOR=#000000])[/COLOR];\</p\>  
\<p\> [COLOR=#000000]}[/COLOR];\</p\>  
\<p\> timeline.[COLOR=#000080]bg\_mc[/COLOR].[COLOR=#0000ff]\_alpha[/COLOR] = [COLOR=#000080]40[/COLOR];\</p\>  
\<p\> createPages[COLOR=#000000]([/COLOR]timeline, [COLOR=#0000ff]data[/COLOR][COLOR=#000000])[/COLOR];\</p\>  
\<p\>[COLOR=#000000]}[/COLOR]\</p\>  
\<p\>function createPages[COLOR=#000000]([/COLOR]basepage, [COLOR=#0000ff]data[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#808080]_// compute scale\</p\>_[/COLOR]  
\<p\> [COLOR=#808080]_// attach clips\</p\>_[/COLOR]  
\<p\> [COLOR=#0000ff]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000] **var** [/COLOR] i = [COLOR=#000080]0[/COLOR]; i\<data.[COLOR=#0000ff]length[/COLOR]; i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#000000] **var** [/COLOR] page = basePage.[COLOR=#0000ff]attachMovie[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]“page”[/COLOR], [COLOR=#ff0000]“page”[/COLOR]+i+[COLOR=#ff0000]"\_mc"[/COLOR], basepage.$depth++[COLOR=#000000])[/COLOR];\</p\>  
\<p\> page.$depth = [COLOR=#000080]0[/COLOR];\</p\>  
\<p\> [COLOR=#808080]_//\</p\>_[/COLOR]  
\<p\> page.[COLOR=#0000ff]\_x[/COLOR] = positions[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#000080]x[/COLOR]_pagew;\</p\>  
\<p\> page.[COLOR=#0000ff]\_y[/COLOR] = positions[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#000080]y[/COLOR]pageh;\</p\>  
\<p\> page.[COLOR=#0000ff]\_width[/COLOR] = pagew;\</p\>  
\<p\> page.[COLOR=#0000ff]\_height[/COLOR] = pageh;\</p\>  
\<p\> [COLOR=#808080]//\</p\>_[/COLOR]  
\<p\> page.[COLOR=#000080]label[/COLOR] = [COLOR=#0000ff]data[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#000080]label[/COLOR];\</p\>  
\<p\> [COLOR=#808080]_//\</p\>_[/COLOR]  
\<p\> [COLOR=#000000] **var** [/COLOR] pt = [COLOR=#000000]{[/COLOR]x:[COLOR=#000080]10[/COLOR], y:[COLOR=#000080]10[/COLOR][COLOR=#000000]}[/COLOR];\</p\>  
\<p\> page.[COLOR=#0000ff]globalToLocal[/COLOR]COLOR=#000000[/COLOR];\</p\>  
\<p\> page.[COLOR=#000080]destx[/COLOR] = pt.[COLOR=#000080]x[/COLOR]+[COLOR=#000080]10[/COLOR];\</p\>  
\<p\> page.[COLOR=#000080]desty[/COLOR] = pt.[COLOR=#000080]y[/COLOR]+[COLOR=#000080]10[/COLOR];\</p\>  
\<p\> [COLOR=#808080]_//\</p\>_[/COLOR]  
\<p\> page.[COLOR=#000080]desth[/COLOR] = page.[COLOR=#000080]destw[/COLOR]=[COLOR=#0000ff]Math[/COLOR].[COLOR=#0000ff]pow[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000080]3[/COLOR], [COLOR=#0000ff]level[/COLOR][COLOR=#000000])[/COLOR]_[COLOR=#000080]900[/COLOR];\</p\>  
\<p\> [COLOR=#808080]_//\</p\>_[/COLOR]  
\<p\> page.[COLOR=#000080]bg\_mc[/COLOR].[COLOR=#0000ff]\_alpha[/COLOR] = [COLOR=#000080]20[/COLOR]+COLOR=#000000[/COLOR];\</p\>  
\<p\> page.[COLOR=#000080]bg\_mc[/COLOR].[COLOR=#0000ff]onPress[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> goToPageCOLOR=#000000[/COLOR];\</p\>  
\<p\> [COLOR=#000000]}[/COLOR];\</p\>  
\<p\> [COLOR=#808080]_//\</p\>\*[/COLOR]  
\<p\> [COLOR=#0000ff]if[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]level[/COLOR]++;\</p\>  
\<p\> createPagesCOLOR=#000000[/COLOR];\</p\>  
\<p\> level–;\</p\>  
\<p\> [COLOR=#000000]}[/COLOR]\</p\>  
\<p\> [COLOR=#000000]}[/COLOR]\</p\>  
\<p\>[COLOR=#000000]}[/COLOR]\</p\>  
\<p\>function goToPageCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]if[/COLOR] [COLOR=#000000]([/COLOR]page != zoomed[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> main\_mc.[COLOR=#000080]tween[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]"\_width"[/COLOR], [COLOR=#ff0000]"\_height"[/COLOR], [COLOR=#ff0000]"\_x"[/COLOR], [COLOR=#ff0000]"\_y"[/COLOR][COLOR=#000000]][/COLOR], [COLOR=#000000][[/COLOR]page.[COLOR=#000080]destw[/COLOR], page.[COLOR=#000080]desth[/COLOR], page.[COLOR=#000080]destx[/COLOR], page.[COLOR=#000080]desty[/COLOR][COLOR=#000000]][/COLOR],[COLOR=#000080]1[/COLOR],[COLOR=#ff0000]“easeinoutsine”[/COLOR][COLOR=#000000])[/COLOR];\</p\>  
\<p\> zoomed = page;\</p\>  
\<p\> [COLOR=#000000]}[/COLOR] [COLOR=#0000ff]else[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> goToPageCOLOR=#000000[/COLOR]\</p\>  
\<p\> [COLOR=#000000]}[/COLOR]\</p\>  
\<p\>[COLOR=#000000]}[/COLOR]\</p\>  
\<p\>  
[/LEFT]  
[/FONT]

[/FONT][/COLOR]

[COLOR=black][FONT=Arial]

```auto
<menu>
<item>
<label>about us</label>
<data></data>
<subitems>
<item>
<label>history 1</label>
<data></data>
<subitems>
</subitems>
</item>
<item>
<label>history 2</label>
<data></data>
<subitems>
</subitems>
</item>
<item>
<label>history 3</label>
<data></data>
<subitems>
</subitems>
</item>
<item>
<label>history 4</label>
<data></data>
<subitems>
</subitems>
</item>
</subitems>
</item>
<item>
<label>portfolio</label>
<data></data>
<subitems>
<item>
<label>portfolio 1</label>
<data></data>
<subitems>
</subitems>
</item>
<item>
<label>portfolio 2</label>
<data></data>
<subitems>
</subitems>
</item>
<item>
<label>portfolio 3</label>
<data></data>
<subitems>
<item>
<label>portfolio 3a</label>
<data></data>
<subitems>
</subitems>
</item>
<item>
<label>portfolio 3b</label>
<data></data>
<subitems>
</subitems>
</item>
<item>
<label>portfolio 3c</label>
<data></data>
<subitems>
</subitems>
</item>
</subitems>
</item>
</subitems>
</item>
<item>
<label>services</label>
<data></data>
<subitems>
<item>
<label>service1</label>
<data></data>
<subitems>
</subitems>
</item>
<item>
<label>service2</label>
<data></data>
<subitems>
</subitems>
</item>
<item>
<label>service3</label>
<data></data>
<subitems>
</subitems>
</item>
<item>
<label>service4</label>
<data></data>
<subitems>
</subitems>
</item>
</subitems>
</item>
<item>
<label>contact</label>
<data></data>
<subitems></subitems>
</item>
</menu>

```

[/FONT][/COLOR]
