ok i have
var theXML:XML = new XML();
theXML.ignoreWhite = true;
theXML.onLoad = function() {
var nodes:Array = this.firstChild.childNodes;
//nodes.length = int amount;
for (i=0; i<nodes.length; i++) {
text_on = nodes*.attributes.desc;
id_on = nodes*.attributes.id;
theList_2.addItem(text_on, id_on);
var t = attachMovie("ball", "ball"+i, i);
t._x = Math.random()*800;
t._y = Math.random()*600;
t.dx = Math.round(Math.random()*800);
t.dy = Math.round(Math.random()*600);
t._xscale = Math.random()*50+40;
t._yscale = t._xscale;
t.onEnterFrame = mover;
//captionFN(true, text_on, id_no);
//t.onRollOver = captionFN(true, text_on, id_on);
//t.onRollOut = captionFN(false, text_on, id_on);
//roleOver(id_on, text_on, true);
//t.onRollOut = roleOver(id_on, text_on, false);
t.onRollOver = captionFN(true, text_on, id_no);
//this.onRollOut captionFN(false);
};
//captionFN = function (showCaption, captionText, bName) {
}
function mover() {
this._x += (this.dx-this._x)/20;
this._y += (this.dy-this._y)/20;
if (Math.round(this._x) == this.dx) {
this.dx = Math.round(Math.random()*600);
this.dy = Math.round(Math.random()*800);
}
}
//RollOver
//function roleOver(name_Value, text_Value, bool_Value) {
//}
//////////////////////////////////////////
captionFN = function (showCaption, captionText, bName) {
if (showCaption) {
_root.createEmptyMovieClip("hoverCaption", this.getNextHighestDepth());
cap.desc.text = captionText;
cap._width = 7*cap.desc.text.length;
cap._alpha = 75;
//
if ((bName._width+bName._x+cap._width)>Stage.width) {
xo = -2-cap._width;
yo = -17;
} else {
xo = 2;
yo = -17;
}
hoverCaption.onEnterFrame = function() {
cap._x = _root._xmouse+xo;
cap._y = _root._ymouse+yo;
cap._visible = true;
};
} else {
delete hoverCaption.onEnterFrame;
cap._visible = false;
}
};
/////////////////////////////////////////
theXML.load("http://www.namit.org/404_flash/product.php");
ball is an image, how do i add text when i hover over it?