# Dynamic Menu Using LoadVars

**URL:** <https://forum.kirupa.com/t/dynamic-menu-using-loadvars/46469>\
**Category:** flash\
**Created:** [March 24, 2004, 10:02pm UTC](https://forum.kirupa.com/t/dynamic-menu-using-loadvars/46469 "2004-03-24T22:02:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skaiwayne](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@skaiwayne](https://forum.kirupa.com/u/skaiwayne)\
**Post date:** [March 24, 2004, 10:02pm UTC](https://forum.kirupa.com/t/dynamic-menu-using-loadvars/46469/1 "2004-03-24T22:02:43Z")

</div>

Im loading an ASP file from the Database and the bringing it into flash using LoadVars object. Im trying to create a dynamic menu the asp file looks like this:  
&menutxt=ABOUT,CONTACT,PHOTO GALLERY,GUEST BOOK,LINKS,  
In flash Im using an Array like this:

dataObj = new LoadVars();  
dataObj.onLoad = function(success) {  
if (success) {  
buttonNames = dataObj.menutxt  
buttonNames = new Array();  
split(buttonNames, “,”)

i = 0;  
while (i \< buttonNames.length) {  
trace(buttonNames)  
i++;  
}  
dataObj.load(“[http://localhost/flashdb/send.asp](http://localhost/flashdb/send.asp)”);

When I use this code on the Vars Object It will keep the same format:  
ABOUT,CONTACT,PHOTO GALLERY,GUEST BOOK,LINKS,

But I just create an array and put the above information in it, It will split and write out correctly.

Can anyone see whats up?
