| | | Bruno Camargos |  |
| Posted: Tue Sep 02, 2008 8:57 pm Post subject: XML MENU clicked |  |
| |  | |
Hello.. I have a XML menu with this code:
Where the MovieClip "bt" is duplicated according to the xml..
I would like to mark up (CLICKED) , when the site is on certain pages, the button of this page.
Example... if the site loads on the page HOME, i´l like to show for the user that this button is active..... is clicked...
I dontn know how to do this... Should I duplicate other MC, and this MC may be with different color and has no link?
Could you help me?
_______________ var dados:XML = new XML(); dados.ignoreWhite = true; dados.load('menu.xml');
dados.onLoad = function():Void {
qtd = this.childNodes[0].childNodes.length;
for(i=0; i<qtd; i++){
bt.duplicateMovieClip('bt' + i, _root.getNextHighestDepth());
_root['bt'+i]._y += i*27;
_root['bt'+i].t this.childNodes[0].childNodes[i].childNodes[0].firstChild;
_root['bt'+i].texto.text = _root['bt'+i].t;
_root['bt'+i].link this.childNodes[0].childNodes[i].childNodes[1].firstChild;
_root['bt'+i].onPress = function() { getURL(this.link); };
_root['bt'+i].onRollOver = function(){ this.gotoAndPlay(2); }
_root['bt'+i].onRollOut = function(){ this.gotoAndPlay(11); }
}
bt.unloadMovie(); }
<?xml version="1.0" encoding="utf-8"?> <menu> <item> <texto> <![CDATA[INSTITUCIONAL]]> </texto> <link> <![CDATA[http://www.pasi.com.br/home/conteudo.aspx?codigo=1]]> </link> </item> </menu> |
|