PDA

View Full Version : Help..CSS file not getting applied



silentweed
May 20th, 2005, 04:49 PM
Hi guys ok this is my code, my CSS is not getting applied why? any help would be appreciated..thanks



var myLV_lv:LoadVars = new LoadVars();
var cssStyles:TextField.StyleSheet = new TextField.StyleSheet();
cssStyles.load("styles/cssStyles.css");


cssStyles.onLoad = function(bSuccess:Boolean) {
if (bSuccess) {
trace("success loading css");
infoLoader_txt.styleSheet = cssStyles;
myLV_lv.load("information/aboutme/aboutme.txt");
} else {
trace("failure");
}
};


myLV_lv.onLoad = function(success:Boolean) {
if (success == true) {
infoLoader_txt.htmlText = myLV_lv.info;
infoLoader_txt.scroll = 1;
} else {
infoLoader_txt.text = "I'm sorry this page didnt load correctly";
}
};




The style is as follows :




headinginfo {
font-family: "Verdana";
font-size: 40px;
}





And the external text file is:




info=<html><body><span class="headinginfo">Education</span><b>BSc Mathematics</b>
- University of Warwick, 1997<br><b>A-Levels</b> -Mathematics, etc etc..</body></html>




Now the text is succefully being loaded into the dynamic text field and also in the trace statement i get "success loading css" so it looks like the css is loading as well...


Also the font Verdana has been embedded in the movie(so shudnt be a problem in that respect)..and the button render as html is pressed!!

So why is the class not being applied to the word "Education"? ANy help appreciated ,its driving me nuts!!

thanks

Macro-design
May 20th, 2005, 05:10 PM
I'm not sure it's going to solve the problem, but try:

.headinginfo {
font-family: Verdana;
font-size: 40;
}

hogfish
December 20th, 2006, 09:19 PM
I go this work by adding the "." in my css file. My question is: I have 5 different Dynamic Textfield on the main movie that I want to load text into from the single external ".txt" file.
I am getting undefined in all except for 1 of the text fields. Can anyone help me figure this out.


Thank you


Hi guys ok this is my code, my CSS is not getting applied why? any help would be appreciated..thanks



var myLV_lv:LoadVars = new LoadVars();
var cssStyles:TextField.StyleSheet = new TextField.StyleSheet();
cssStyles.load("styles/cssStyles.css");


cssStyles.onLoad = function(bSuccess:Boolean) {
if (bSuccess) {
trace("success loading css");
infoLoader_txt.styleSheet = cssStyles;
myLV_lv.load("information/aboutme/aboutme.txt");
} else {
trace("failure");
}
};


myLV_lv.onLoad = function(success:Boolean) {
if (success == true) {
infoLoader_txt.htmlText = myLV_lv.info;
infoLoader_txt.scroll = 1;
} else {
infoLoader_txt.text = "I'm sorry this page didnt load correctly";
}
};


The style is as follows :




headinginfo {
font-family: "Verdana";
font-size: 40px;
}



And the external text file is:




info=<html><body><span class="headinginfo">Education</span><b>BSc Mathematics</b>
- University of Warwick, 1997<br><b>A-Levels</b> -Mathematics, etc etc..</body></html>


Now the text is succefully being loaded into the dynamic text field and also in the trace statement i get "success loading css" so it looks like the css is loading as well...


Also the font Verdana has been embedded in the movie(so shudnt be a problem in that respect)..and the button render as html is pressed!!

So why is the class not being applied to the word "Education"? ANy help appreciated ,its driving me nuts!!

thanks