# Portfolio menu!

**URL:** <https://forum.kirupa.com/t/portfolio-menu/16036>\
**Category:** flash\
**Created:** [March 20, 2003, 11:39am UTC](https://forum.kirupa.com/t/portfolio-menu/16036 "2003-03-20T11:39:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mezzok](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mezzok](https://forum.kirupa.com/u/mezzok)\
**Post date:** [March 20, 2003, 11:39am UTC](https://forum.kirupa.com/t/portfolio-menu/16036/1 "2003-03-20T11:39:00Z")

</div>

Hey there! After a short break I’m still stuck on this one…  
I’m trying to create a menu… that can be easily updatable  
with actionscript in a txt file… (menu.txt)

However, the files (swf) have to load in mc (dropstage).  
here’s the code for the menu (menu.txt)

```php
var myButtons = new Array("1","2");
var myClickURLs = new Array("1.swf","2.swf")

for (var i=0; i<myButtons.length; i++){
	// Copy from library to stage
	_root.attachMovie("coolbutton", "but"+i, i);
	
	// Create shortcut to this new coolButton in memory
	var but_mc = eval("_root.but"+i);
	
	// Store textLabel in movieclip so it
	// can be found byu the textlabel mc
	but_mc.textLabel = myButtons*;
	but_mc.clickURL = myClickURLs*;
	
	// Position the movieclip
	but_mc._x = 300;
	but_mc._y = 200;
	if (i>0){
		but_mc._y = eval("_root.but"+(i-1))._y + eval("_root.but"+(i-1))._height;
	}
	
	// Make movieclip visible
	but_mc._visible=true;
}

```

and for the buttons…

```php
on (rollOver, dragOver) {
    textAnimation.gotoAndPlay("over");
}
on (rollOut, dragOut) {
    textAnimation.gotoAndPlay("out");
}
on (release) {
    hit.gotoAndStop("hit");
    loadMovie("clickURL", "_root.drop");
}

```

There might be a problem with the onrelease action…  
Does anyone know how to solve this one?  
I couldn’t find my posted topic… 2nd round!

---

<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:** [March 20, 2003, 9:36pm UTC](https://forum.kirupa.com/t/portfolio-menu/16036/2 "2003-03-20T21:36:52Z")

</div>

loadMovie(“clickURL”, “\_root.drop”);  
should be  
loadMovie(clickURL, “\_root.drop”);

---

<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:** [March 21, 2003, 9:16am UTC](https://forum.kirupa.com/t/portfolio-menu/16036/3 "2003-03-21T09:16:14Z")

</div>

It works! so f#cking amazing!  
After 4 weeks 🙂

Now the only thing I’ve to do is to add a preloader for the swfs…

Thank YOU! :crazy:
