Hi,
I have a little problem and i don’t really know how to do what i want. I have an xml file with url of pictures and text for the comment of those pics. I create thumbnails buttons with an attachmovie on my main scene, all this works great but i have also a kind of tooltip, and i want that each time i roll over the button, the text change with the good atribute of my xml file. I do something like this but it doesn’t work :
function attach_btn() { _root.createEmptyMovieClip("thumb_mc", 1);
thumb_mc._x = 10;
thumb_mc._y = 10;
//attach buttons on the container
Array_text = new Array();
Array_text.push(MyXml.firstChild.childnodes.attributes.TEXT);
trace(Array_text);
var nb_pic = MyXml.firstChild.childnodes.length;
for (i=0; i<nb_pic; i++) {
thumb_mc.attachMovie("Btn", "Btn"+i, i, {_y:i*35});
thumb_mc["Btn"+i].onRollOver=function(){
this.GotoAndPlay("over") ;
caption.mc._visible=true ;
caption_mc.caption_text.text=Array_text* ;
}
}
}
I hope my english is quite understandable and i hope someone can help me with that problem.
Thank’s.
chris
Yes sorry it’s caption_mc ! Yes i embedded the font but that’s not the problem. I know now where it comes from but i don’t know how to deal with it. in fact,here
for (i=0; i<nb_pic; i++) {
thumb_mc.attachMovie("Btn", "Btn"+i, i, {_y:i*35});
thumb_mc["Btn"+i].onRollOver=function(){
this.GotoAndPlay("over") ;
caption_mc._visible=true ;
caption_mc.caption_text.text=Array_text* ;
}
}
i increment the var i but it doesn’t keep the value so the caption doesn’t show anything. I don’t know how i could do that. I have the same problem on my onrelease function cause each time i click or each time i rollover my button i=16 and not 1,2,3…depends on which button.