all groups > flash actionscript > january 2006 >
You're in the

flash actionscript

group:

dynamic text box scrolling and css


dynamic text box scrolling and css w_allen
1/12/2006 10:39:06 PM
flash actionscript:
I'm having some problems getting my css to fully load into a dynamic text box.
I'm trying to combine the css tutorial from the actionscript dictionary (MX)
and a basic scrollbar tutorial from actionscript.org
(http://www.actionscript.org/tutorials/intermediate/scrolling_a_text_box/index.s
html). My style sheet seems to load, but the font sizes are huge. If anyone
could help me out I would really appreciate it.





onClipEvent (load){

scrolling = 0;
frameCounter = 1;
speedFactor = 10;

var style_sheet = new TextField.StyleSheet();
var css_url = "html_styles.css";
style_sheet.load(css_url);

style_sheet.onLoad = function(ok) {
if (ok) {

col1text.styleSheet = style_sheet;

}
};

loadVariables("bandscol1.txt", this);


}


onClipEvent (enterFrame){

if( frameCounter % speedFactor == 0){

if( scrolling == "up" && bands1.scroll > 1){

bands1.scroll--;

}


else if( scrolling == "down" && bands1.scroll < bands1.maxscroll){

bands1.scroll++;

}

frameCounter = 0;
}

frameCounter++;
}
Re: dynamic text box scrolling and css w_allen
1/13/2006 12:57:57 AM
I think I solved it. I was resizing the dynamic text box the wrong way and it
was scaling the text. Could someone confirm that this could cause my text (even
though it was loaded externally) to appear not the size that I set it at in my
style sheet.

thanks.
AddThis Social Bookmark Button