Hi,
Does anyones know how you load an external CSS file into a movie clip that's 2
MCs deep from the _root timeline?
I've managed to do it on the _root timeline, but it doesn't work when i'm in
the movie clips's timeline...
The XML loads in ok and the text field is called myText. The code below is on
frame 1 of the movie clip's timeline that's nested two MCs in from the _root.
Thanks in advance :)
Here's my code:
//init Text Field
myText.html = true;
myText.wordWrap = true;
myText.multiline = true;
myText.label.condenseWhite = true;
/******************************/
//load css
mapStyle = new TextField.StyleSheet();
mapStyle.load("map.css");
myText.styleSheet = mapStyle;
/******************************/
//load in XML
mapContent = new XML();
mapContent.ignoreWhite = true;
mapContent.load("south_africa.xml");
mapContent.onLoad = function(success) {
if (success) {
myText.text = mapContent;
}
};
tomeanand@hotmail.com - 28 Apr 2005 08:02 GMT
hi johnny t
if you are changing your last piece of code to the following it will work
you have say htmlText instead of text
ie; myText.htmlText = "<p class=yourCSSClass>"+mapContent+"</p>"
or you can use the <span> tag also
/******************************/
//load in XML
mapContent = new XML();
mapContent.ignoreWhite = true;
mapContent.load("south_africa.xml");
mapContent.onLoad = function(success) {
if (success) {
myText.htmlText = "<p class=yourCSSClass>"+mapContent+"</p>"
}
};
Anand