Scroll bars

Hey,
I read the tutorial on the site and did exactly what I was told. I’m trying to have a scroll bar that will scroll text loaded through a .txt file. When I publish my scroll bar doesn’t work and my text is double spaced. Anyone have any other tutorials or any other ideas?

ok…now i have got my scroll bar working but my text is still doubled spaced. Does anyone know how to fix the dynamic text from being doubled spaced?

here’s why http://www.kirupaforum.com/forums/showthread.php?s=&postid=189323#post189323

and here’s answer http://www.kirupaforum.com/forums/showthread.php?s=&postid=189241#post189241

:wink:

I still seem to be having a little trouble. This is what I have:

“kirupatext=
/nHello There!
I am an example of text that has been loaded from a separate location on kirupa’s server.
Best of all, notice that you can scroll the contents of the text up and down by clicking on
the arrows. This is a nice, useful feature that you can use on your site.”

But is there anyway where I can just type a paragraph and let it go or do I have to figure out exactly where I want the returns and such?

Also is there a way I can change the colors of the scroll bar?

nope… i don’t think there’s another way.

and read this:
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=7271#post41587

Can you just please give me a quick example of how i use the /n and /r code inside the notepad file. Because by the way I showed you above I get the /n to actually show up when i publish. I don’t have to put it in a tag or anything do I?

you use **
**, not /n. :-\

"kirupatext=

Hello There!
I am an example of text that has been loaded from a separate location on kirupa’s server.
Best of all, notice that you can scroll the contents of the text up and down by clicking on

the arrows. This is a nice, useful feature that you can use on your site."

That is what i have in my text file and the
shows up in the published swf. What to do?

i don’t have flash installed in this pc, so i can’t make an example for you. :-\

however, if you can’t get it to work, you could try something else:

you can use the <br> tag like you would in html. you just need to change the script a bit…

loadText = new loadVars();
loadText.load("kirupa.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.html = true;
scroller.htmlText = this.kirupatext;
};

:wink:

OK i think i got it…its kinda a pain in the *** but thanks for all the help!

no problem, sanman. =)

Hey, I got another quick question. My dynamic text through a text file was working great in the root scene but now i’ve imbedded it into a movie clip with the instance name of “text”. I made some edits to the actionscript to compenstate for this but it does not appear to be working. This is the action script in which I have in the frame of the root directory.

loadText = new loadVars();
loadText.load(“news.txt”);
// creating the loadVarsText function
loadText.onLoad = function() {
_root.text.scroller.html = true;
_root.text.scroller.htmlText = this.newstext;
};

Can anyone help me?

a/ you should define the onLoad handler before loading the text
b/ use trace to check if “this.newstext” contains anything…

How would I setup a trace? I mean this was working just fine in the root directory I just endbedded it into a movie clip called “text”.

**

Also is there a way I can change the colors of the scroll bar?
**

you can change the color and look of your scroll bar if you use the flash MX component. You will need to drag it from the component box to the stage, then in the library, edit it from there.
There is a comment frame for each part of the scroller when you break it down and it tells of how to edit it.:elderly:

OK thanks for all the help guys. Coolidge I like that way the best…its easy :slight_smile: Its looking good.