I see that it can run from a txt, but what about other file, and if I want to add color, more than one color and link it how can I? Thank U.
I think it is just .txt files.
To use colors and make links, you have to use… HTML text :o
To do this, take the code provided in the tutorial and modify it like this…
loadText = new loadVars();
loadText.load("kirupa.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.html = true;
scroller.htmlText = this.kirupatext;
};
This allows you to use Font format tags such as underline, bold, italics, font colors, font face, font size, and even allows you to use mailto: and standard HTML links.
Thanks
No problem
Thanks a lot !
I had some problems with my Scrollbars, cause the tutorial I used before used loadVariablesNum instead of loadText.
It looked something like this :
loadVariablesNum(“textname.txt”,10);
HTML tags work in this, but you have to click a button twice before scrollbar works.
Another tutorial I got used MIME text, which means I had to convert all my text files to mime everytime I updated it.
(I spend several hours looking for a solution
Now I’m very happy to have TAGS and SCROLLBARS working !
Thanks all !
This site Rocks !
=)
*Originally posted by lostinbeta *
**I think it is just .txt files.
To use colors and make links, you have to use… HTML text :o
To do this, take the code provided in the tutorial and modify it like this…
loadText = new loadVars();
loadText.load("kirupa.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.html = true;
scroller.htmlText = this.kirupatext;
};
This allows you to use Font format tags such as underline, bold, italics, font colors, font face, font size, and even allows you to use mailto: and standard HTML links. **
Doesn’t seem to load now …
My text file is jokes.txt ,
and my string in this file is: jokestext=
- – I this correct ? —
This is my Flash code :
loadText = new loadVars();
loadText.load(“jokes.txt”);
// creating the loadVarsText function
loadText.onLoad = function() {
jokes.html = true;
jokes.htmlText.text = this.jokestext;
};
- What is wrong ?
pls help :-\
Your problem is this line right here…
jokes.htmlText.text = this.jokestext;
you have htmlText.text… which makes no sense. .htmlText is the same as .text except it tells Flash to convert the HTML if the HTML is set to true. So in that case it should just be…
jokes.htmlText = this.jokestext;
hmm… having trouble…
here’s my code… i’m pretty sure its right…
loadText = new loadVars();
loadText.load(“kirupa.txt”);
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.html = true;
scroller.htmlText = this.kirupatext;
then the txt file i’m using is here… ( view source )
http://www.monotypic.com/clients/7day/kirupa.txt
everything works right… cept if i try to add in txt colors through
<“font color = #FF0000>my red txt</font”>"
or
“<“font color= red> my red txt</font”>”
then all of that txt doesn’t show up… its like its not there.
mm… my first post and allready im soo confused.
Try…
<font color='#FF0000'>my red txt</font>
WIth the single quotes around the color number. It will not work if you use “red”, I have tried that before.
Oh yeah and…
<MARQUEE BEHAVIOR=“scroll” DIRECTION=“left” SCROLLDELAY=“10” SCROLLAMOUNT=“1” TRUESPEED>[SIZE=9]WELCOME TO KIRUPA FORUM!!![/SIZE]</MARQUEE>
ty ty ty
No problem. Did the font thing work?
:hangover: my head hurts
any chance in lookin at this
loadText = new loadVars();
loadText.load(“gigs.txt”);
// creating the loadVarsText function
loadText.onLoad = function() {
scroller.html = true;
scroller.htmlText = this.textField;
};
it doesn’t seem to want to let me scroll.
I think its because I haven’t got **a Scroller.html ** or scroller.htmltext
But I’m not too sure
Any chance you can help?
P.S. sorry if I’ve just said the most stupidest thing u’ve heard!
thanx
SpitwolF
spitwolf: Do you have a scrollbar component on the text box?
This problem dealt with this tutorial…
yeh I got a component scroll bar.
I’m guessin I got too much actions on the flash file or summit. But I dunno
do u wanna look at my fla?
If you attach your .fla I will take a quick look at it.
Please supply a .zip file that contains the .fla and the .txt file it loads.
the files too big
Can you upload it to a server and post a link?
there ya go
do it quickly cos I’ll take it off soon
FLA
Ok… I fixed it, but here are a few tips…
-
Considering your set up you didn’t need to create multiple textboxes. 1 textbox and 1 scrollbar is all you need and you can just load new text into that same box. This is good for obvious reasons. I fixed this problem.
-
You don’t need to define a new loadVars() everytime you load a new text file, you can reuse the old loadVars object and just use the myloadVars.load() method to load in the new text. I fixed this as well and commented the code.
-
Although “do it quickly” seems like an order to me instead of asking me to please hurry, I will just take it as just bad wording, and say that I could have done it quicker had you supplied me with a .zip of the text files you were using as well as the .fla and a statement of where the problem specifically was.
Alright, you can download the new file by CLICKING HERE
I am sorry m8, it was just bad wording. I just wanted off my FTP site as quick as poss. and sorry about the whole .txt files n everything, I’m kinda new to the whole flash experience. It won’t happen again.
But thanx! it is well appreciated
SpitwolF