PDA

Click to See Complete Forum and Search --> : DROPDOWN MENU



fery
06-22-2001, 04:08 AM
Please Help,

Searching for a DROPDOWN MENU where the submenu opens again an other sub-submenu, 3steps all in all. Important is, that it opens under each other and that U can easy update the topics.
Sounds complicadet? It is complicadet!

If U have an example based on JavaScript, xml, ...
would be a great help also.

Thanks a lot

Fery

VAYKENT
06-22-2001, 11:25 AM
I guess I don't see what the problem is... Menu systems with easily updated 'topics' (I'm assuming you mean - titles?) can best be done by 'loading' an external text file of name/value pairs, placing those values in the boxes, and then you could even do a simple on(release){gotoAndPlay(frameName)} type of navigation..... or is your problem different?? JavaScript/XML??? Some reason you have to use those?

fery
06-22-2001, 02:33 PM
OK, thanks, I'll try.
Hope I understood what U mean...

Why JavaScript or XML... easy,
in case I don't find any examples
in Flash.

thanks again for your time

fery



Originally posted by VAYKENT
I guess I don't see what the problem is... Menu systems with easily updated 'topics' (I'm assuming you mean - titles?) can best be done by 'loading' an external text file of name/value pairs, placing those values in the boxes, and then you could even do a simple on(release){gotoAndPlay(frameName)} type of navigation..... or is your problem different?? JavaScript/XML??? Some reason you have to use those?

VAYKENT
06-22-2001, 08:50 PM
Then you might want ot just ask on the general forums.... They'd eb better suited to solving your question - unless you wanted the extra hassle of going with something more than you need..... : )

paul67
06-27-2001, 06:21 AM
put the data in a array wich will be used as a database.
by using id and parent u can easy make a dropdown menusystem that is re-usable.
put it in functions and with a lot of vars

here's a example of something i use.
The dbarray is made on level0 from xml generated out of a mysql database by php. (if you want i can give that code too

this code is in _root.ms (the menussytem)
<code>

function dupe(pid,xpos,ypos,nivo)
{
var i;
var vorig;
var huidig;
var x = xpos;
var y = ypos;
var nivo;

for (i=0;i<=_root.db_array.length;i++)
{

if (_root.db_array[i]["parent"]==pid)
{


duplicateMovieClip("menu_","menu_" add _root.db_array[i]["id"], i);

setProperty("menu_" add _root.db_array[i]["id"],_x,x*number(_root.ItemWidth));
setProperty("menu_" add _root.db_array[i]["id"],_y,y*number(_root.ItemHeight)+_root.startpos);

//set varibalen
// de present is the next of the past ;
eval("menu_" add vorig).volgende = _root.db_array[i]["id"];
//setting vorig
eval("menu_" add _root.db_array[i]["id"]).vorig = vorig;
//resetting
vorig = _root.db_array[i]["id"];


//varibalen ivm aanroepen submovies en naam menu-item
eval("menu_" add _root.db_array[i]["id"]).menutxt = _root.db_array[i]["naam"];
eval("menu_" add _root.db_array[i]["id"]).sjabloon = _root.db_array[i]["sjabloon"];
eval("menu_" add _root.db_array[i]["id"]).id = _root.db_array[i]["id"];
eval("menu_" add _root.db_array[i]["id"]).parent = _root.db_array[i]["parent"];
eval("menu_" add _root.db_array[i]["id"]).niveau = nivo;

//setting de item in startposition(not visible==2)
eval("menu_" add _root.db_array[i]["id"]).gotoandstop(2);

//search for childs
dupe(_root.db_array[i]["id"],x+1,y,nivo+1);
y=y+1;
}
}

}

function CloseChilds(pid,nivo)
{


var pid;
for (i=0;i<=_root.db_array.length;i++)
{
if (_root.db_array[i]["parent"]!=pid-1)
{
if (eval("menu_" add _root.db_array[i]["id"]).niveau>(nivo)){
eval("menu_" add _root.db_array[i]["id"]).gotoAndStop(2);
}

}


}



}



function OpenChilds(pid)
{


var pid;
for (i=0;i<=_root.db_array.length;i++)
{
if (_root.db_array[i]["parent"]==pid)
{
eval("menu_" add _root.db_array[i]["id"]).gotoAndStop(1);
_root.test= eval("menu_" add _root.db_array[i]["id"]);
}


}


}



</code>