gcr108
07-19-2004, 10:09 PM
ok, I am kind of new at all of the actionscript. I am only really having issues with one aspect of a site that I am designing. The issue is that I am trying to dynamically load text but the text only shows up if I make the .swf with the text field appear first. The issue may be a layer issue because I am loading .swf's ontop of each other to get a desired fade in/out effect for some images. Here is the code bit that is controlling the textfield.
//----------<loadVars>---------\\
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function (success) {
if (success) {
_level10.loadedInfo.htmlText = myLV.info;
} else {
_level10.loadedInfo.text = "There was an error loading the requested information. Please contact the Webmaster and report your error.";
}
}
//----------</loadVars>--------\\
//----------<load CSS>---------\\
var cssStyles:TextField.StyleSheet = new TextField.StyleSheet ();
cssStyles.load("styles/styles.css");
cssStyles.onLoad = function (success) {
if (success) {
loadedInfo.styleSheet = cssStyles;
_level.myLV.load("vars/about.txt");
} else {
loadedInfo.text = "There has been an error.";
}
}
//----------<load CSS>---------\\
_level10.myLV.load("vars/about.txt");
//---------<scroll buttons>----\\
this.scrollDown.onRelease = function () {
loadedInfo.scroll += 1;
}
this.scrollUp.onRelease = function () {
loadedInfo.scroll -= 1;
}
//---------</scroll buttons>-------[/COLOR]\\
any help would be tremendous.
//----------<loadVars>---------\\
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function (success) {
if (success) {
_level10.loadedInfo.htmlText = myLV.info;
} else {
_level10.loadedInfo.text = "There was an error loading the requested information. Please contact the Webmaster and report your error.";
}
}
//----------</loadVars>--------\\
//----------<load CSS>---------\\
var cssStyles:TextField.StyleSheet = new TextField.StyleSheet ();
cssStyles.load("styles/styles.css");
cssStyles.onLoad = function (success) {
if (success) {
loadedInfo.styleSheet = cssStyles;
_level.myLV.load("vars/about.txt");
} else {
loadedInfo.text = "There has been an error.";
}
}
//----------<load CSS>---------\\
_level10.myLV.load("vars/about.txt");
//---------<scroll buttons>----\\
this.scrollDown.onRelease = function () {
loadedInfo.scroll += 1;
}
this.scrollUp.onRelease = function () {
loadedInfo.scroll -= 1;
}
//---------</scroll buttons>-------[/COLOR]\\
any help would be tremendous.