View Full Version : scroll bars
sanman918
May 7th, 2003, 07:11 PM
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?
sanman918
May 7th, 2003, 07:19 PM
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?
kode
May 7th, 2003, 08:28 PM
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
;)
sanman918
May 7th, 2003, 08:53 PM
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?
sanman918
May 7th, 2003, 09:03 PM
Also is there a way I can change the colors of the scroll bar?
kode
May 7th, 2003, 09:22 PM
nope.... i don't think there's another way.
and read this:
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=7271#post41587
sanman918
May 7th, 2003, 09:49 PM
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?
kode
May 7th, 2003, 10:06 PM
you use \n, not /n. :-\
sanman918
May 7th, 2003, 10:36 PM
"kirupatext=
\n 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 \n shows up in the published swf. What to do?
kode
May 7th, 2003, 10:57 PM
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;
};
;)
sanman918
May 7th, 2003, 11:13 PM
OK i think i got it....its kinda a pain in the *** but thanks for all the help!
kode
May 7th, 2003, 11:14 PM
no problem, sanman. =)
sanman918
May 8th, 2003, 05:49 PM
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?
eyezberg
May 9th, 2003, 02:50 AM
a/ you should define the onLoad handler before loading the text
b/ use trace to check if "this.newstext" contains anything..
sanman918
May 9th, 2003, 03:06 AM
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".
Coolidge
May 9th, 2003, 05:35 PM
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:
sanman918
May 9th, 2003, 07:43 PM
OK thanks for all the help guys. Coolidge I like that way the best....its easy :) Its looking good.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.