Is it possible to pull a function (and run it) from an xml attribute?
I have a dynamic xml menu with lots of buttons and sub buttons
function subButtnClick(........
if(String(_xml.item[_off.parent.id].subitem[_subOff.parent.id].@fn) != ""){
trace(String(_xml.item[_off.parent.id].subitem[_subOff.parent.id].@fn)); //returns the fn attribute - in this case, "aboutUs()" - when the "about Us" sub button is clicked.
}
How can I take that string value of “aboutUs()” and make it run as an actual function within that same if statement?
What I’d love to do is place a boat load of functions that each allow me to manipulate the stage in different ways - creating different page looks - on a separate imported “menuFunctions.as”. Each menu button click returns the “fn” xml attribute which is then magically run as a particular function from menuFunctions.as, finally then, manipulating the main stage.
Is this possible? Is there a better way? I really like this little menu but it wasn’t built to manipulate the flash stage rather take you to another URL.
New to As3…and programming in general…having a hard time.
Hope someone can help or point me in the right direction…
Thanks