fpw138
December 15th, 2002, 03:38 PM
Hello,
I have the ActionScript working fine on the main stage. Once I convert all layers into mc_clip, then put the mc_clip into the main stage, my html txt file no longer appear on the scroll area. Below is the ActionScript on the first frame in mc_clip. Also, the button 1 and button2 ActionScript to display the html.
Questions:
How to call the html to display on the main stage?
This is the ActionScript in mc_clip:
//load html txt file
loadVariablesNum("davehtml.txt", 0);
loadVariablesNum("greghtml.txt", 0);
// Create a new instance of the loadVars object and assing it to a variable
loadVarsText = new loadVars();
loadVarsText.load("loadDaveText.txt");
// assign a function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
// set the text content of the Text Field
// with the instance name "scroller" equal to the
// contents of the variable
scroller.text = this.var1;
} else {
trace("not loaded");
}
};
ActionScript on button:
//Click button1 to display davehtml text file in the scroll area
on (release) {
display = HTMLpageDave;
}
//Click button2 to display greghtml text file in the scroll area
on (release) {
display = HTMLpageGreg;
}
I am new in this forum. I hope I can find my answers here.
Thank you in advance!!
:q:
I have the ActionScript working fine on the main stage. Once I convert all layers into mc_clip, then put the mc_clip into the main stage, my html txt file no longer appear on the scroll area. Below is the ActionScript on the first frame in mc_clip. Also, the button 1 and button2 ActionScript to display the html.
Questions:
How to call the html to display on the main stage?
This is the ActionScript in mc_clip:
//load html txt file
loadVariablesNum("davehtml.txt", 0);
loadVariablesNum("greghtml.txt", 0);
// Create a new instance of the loadVars object and assing it to a variable
loadVarsText = new loadVars();
loadVarsText.load("loadDaveText.txt");
// assign a function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
// set the text content of the Text Field
// with the instance name "scroller" equal to the
// contents of the variable
scroller.text = this.var1;
} else {
trace("not loaded");
}
};
ActionScript on button:
//Click button1 to display davehtml text file in the scroll area
on (release) {
display = HTMLpageDave;
}
//Click button2 to display greghtml text file in the scroll area
on (release) {
display = HTMLpageGreg;
}
I am new in this forum. I hope I can find my answers here.
Thank you in advance!!
:q: