Hi - i am a newbie so hi to everyone.
I am trying to create a basic movie that has the bare minimum, that will load data from css & txt file. I have setup four buttons to scroll text , up down sped up speed down, but am unable to get text files or data from css file to load. I curently have a mishmash of actionscript on actions layer which is probably way off the mark, but i am still new to flash in relative terms, so forgive me.
All i'd like to do is use this setup and have the text load and scroll on button click (or hover as well). Below is how it currently stands. No debug errrors as such, just no text load. My colleague had a version working with a scrollbar from UIComponent but the scrollbar looks way out of place and the scrollbar script conflicted with the buton clip i have in place, so i removed it..
Could somebody possibly help? I can forward the .fla if required.
// Load the CSS file and attach it to my mytextbox
my_txtstyle = new TextField.StyleSheet();
my_txtstyle.load("default.css");
my_txt.styleSheet = my_txtstyle;
// Specify mytextbox to read text as HTML
my_txt.html = true;
// Specify mytextbox to wrap text
my_txt.wordWrap = true;
// Specify mytextbox to have a scrollbar
my_txt.multiline = true;
// Load text to display and define onData handler.
var my_lv:LoadVars = new LoadVars();
my_lv.onData = function(src:String) {
if (src != undefined) {
my_txt.text = src;
} else {
my_txt.text = "Error loading text.";
}
};
my_lv.load("about.txt");
// Font color
my_txt.setStyle("color", "0xFFFFFF");
// Font family
my_txt.setStyle("fontFamily", "Verdana");
// Font size
my_txt.setStyle("fontSize", "11");
thnx
bradlee