i’m using hga77’s xml menu you can view here.
ok, so i’m trying to load swfs from the menu, what i’ve got so far is:
function executeAction()
{
loadMovie("NEWS.swf", _root.content);
trace(NEWS.swf);
}
/*Uncomment the above line to get the menu working
and add a content mc on the stage (with the instance name "content") to
load in your stuff (swf's, jpg's, etc).
*/
function selectItem(itemType, item)
{
if(itemType == "item")
{
curSub = null;
if (this[item].action != null && curItem != item)
{
executeAction(this[item].action);
}
if (this[item].sub == false || curItem == item)
{
curItem = null;
removeSub();
}
else
{
curItem = item;
buildSub(item);
}
}
else if(itemType == "sub")
{
if (subholder[item].action != null && curSub != item)
{
executeAction(subholder[item].action);
}
if (subholder[item].subsub == false || curSub == item)
{
curSub = null;
removeSubSub();
}
else
{
curSub = item;
buildSubSub(item);
}
}
}
and the code on the xml is:
<?xml version="1.0"?>
<menu>
<item name="NEWS" action="executeAction">
</item>
<item name="BIOGRAPHY" action="link2">
</item>
<item name="COLLECTION" action="link3">
<sub name="XX/XX" action="link3,1">
<subsub name="PRESS RELEASE" action="link3,2,1"/>
<subsub name="COLLECTION" action="link3,2,2"/>
<subsub name="MINIATURE" action="link3,2,3"/>
<subsub name="COLLECTION" action="link3,2,4"/>
</sub>
</item>
<item name="PRESS & EVENTS" action="link4">
</item>
<item name="CONTACT" action="link4">
</item>
</menu>
now i’ve got it working for the first button fine, however i can’t work out how to make the other buttons work, i’ve tried creating loads more load functions like this:
function executeBIO()
{
loadMovie("BIO.swf", _root.content);
trace(BIO.swf);
}
function executePRESS()
{
loadMovie("PRESS.swf", _root.content);
trace(PRESS.swf);
}
function executeILL()
{
loadMovie("ILL.swf", _root.content);
trace(ILL.swf);
}
function executeMODELS()
{
loadMovie("MODELS.swf", _root.content);
trace(MODELS.swf);
}
function executeNEWS()
{
loadMovie("NEWS.swf", _root.content);
trace(NEWS.swf);
}
function executeCOLL()
{
loadMovie("COLL.swf", _root.content);
trace(COLL.swf);
}
function executeP+E()
{
loadMovie("P+E.swf", _root.content);
trace(P+E.swf);
}
function executeCONTACT()
{
loadMovie("CONTACT.swf", _root.content);
trace(CONTACT.swf);
}
but the menu stops working. is there anything i can stick in this bit “function executeAction()” that will make the loadmovie load a different swf each time, rather than creating loads of loadmovie functions.
obviously i’m not a coder, but i thought this would be fairly simple. been searching the help files and i can’t find an explanation of it. anyone got any ideas?
Cheers.