Hi, I am trying to modify the hover caption tutorial from here at Kirupa to load the text in the caption from an external text file. Could anyone give me a hand trying to figure this out? I tried the simple way of loading external text but because the text is loaded in a MovieClip this does not work. Here is my code for the hover menu that currently loads the text dynamically through ActionScript:
MovieClip.prototype.resize = function() {
var w = box.caption.textWidth+0
var h = box.caption.textHeight+0;
};
Button.prototype.hover = function(refuge) {
this.onRollOver = function() {
_root.x = 1;
box.createTextField(“caption”, 1, box.test._x+3, box.test._y-145, 2000, 500);
box.caption.type = “dynamic”;
box.caption.html = true;
box.caption.color = “FFFFFF”;
box.caption.multiline = true;
box.caption.wordWrap = true;
box.caption.size = 10;
box.caption.htmlText = refuge;
box.caption.autoSize = “left”;
box.test.resize();
};
this.onRollOut = function() {
_root.x = 0;
box.caption.text = " ";
};
};
item1.hover(“<font face="Arial"><font color=‘#ffffff’><font size="15"><b>This is my Text1</font>”)
item2.hover(“<font face="Arial"><font color=‘#ffffff’><font size="15"><b>This is my Text2</font>”)
item3.hover(“<font face="Arial"><font color=‘#ffffff’><font size="15"><b>This is my Text3</font>”)
item4.hover(“<font face="Arial"><font color=‘#ffffff’><font size="15"><b>This is my Text4</font>”)
item5.hover(“<font face="Arial"><font color=‘#ffffff’><font size="15"><b>This is my Text5</font>”)
stop();
Thank you for any help,
Brian