this is possibly a very basic problem, I'm still building my dynamic
global sub nav, slooowly.
what I want to know if can I add a string to a function,
I have my initial first level navigation, I click a button and then if the
button has children in that section it says true and then brings up the
corresponding children to populate that subnav,
I was going to have 3 separate functions for the subnavs
////what I'm unsure about is the line: 'createSubNav "+page"();
///I wanted to then have the following functions createSubNavHis
createSubNavHers createSubNavTheirs
//is this possible?
//here is my code on the first level buttons///
function mouseClickHandler(e:Event):void {
//var siteNav:XML =
IXml(assets.siteNav).xml;
var
page:String=e.target.label.text;
trace(page);
targetPage=e.target.linkTo;
//targetPage =
e.target.linkTo;
if
(e.target.kiddies.children().length()>0) {
hasChildren=true;
TweenMax.to(nav1, 0.25, {x:-200, ease:Bounce.easeInOut});
trace(e.target.kiddies.children());
createSubNav
"+ page"() ;
trace(hasChildren);
} else {
hasChildren=false;
trace(hasChildren);
Gaia.api.goto("" + [targetPage] + "");
}
}
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders