Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic text problem 1

Status
Not open for further replies.

technoknow

Technical User
Apr 19, 2002
121
US
I have a Dynamic textbox "myField" and a button "ClickButton".
I'm able to load text from an external file using
Code:
loadVariablesNum("DynamicText.txt", 0);
in Frame 1 and
Code:
myField.htmlText = intro;
in Frame 10.
I want to be able to load different text into the myField textbox onMouseOver of the ClickButton.
Could someone tell me how or point to a tutorial that addresses this?
Thanks,
Jim
 
use loadvars

mydata = new loadvars();
mydata.onload = function(){
myfield.html = true;
myfield.htmlText = mydata.tex_var; //whatever your variable name in the text file is.
}
mydata.load("dynamictext.txt");

myClick.onRollover = function(){
mydata.load("different.txt");
}

needless to say myfield and myclick are instance names not variables names
 
If you want to have a comprehensive example of what Bill is trying to put foward in his post, you can check this MM's well explained and documented tutorial:


Furthermore you can have a look at my own try at this and althought I don't use rollOver, it could be easily adapted to do so:


You'll find all relevant files in this package:


Regards,

cubalibre2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top