Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Flash - ActionScript

XML menu

 
Jump to:  
 
Bruno Camargos
PostPosted: Tue Sep 02, 2008 8:59 pm    Post subject: XML menu
       
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

<?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>
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

elektrozaczepy projektowanie wnętrz zaluzje hotele londyn części do maszyn budowlanych