Groups | Blog | Home
all groups > flash actionscript > march 2004 >

flash actionscript : bold in txt loaded whith loadvars


Pluda
3/21/2004 8:41:02 PM
Hello,

How can I have some words of an imported txt in bold?

Do I have to add some "code" to the txt?

Thanks

kglad
3/22/2004 12:44:56 AM
Pluda
3/22/2004 2:01:21 AM
Hi Kglad, Thanks for help. :-)

How I do that? I'm sorry, but I realy don't know anything of html.

I'm trying whith this:

vars=A <b>Arkplus</b> surge como uma empresa inovadora cujo objectivo visa a
maximiza??o e optimiza??o da competitividade da nossa carteira de Clientes.&

I wanted that the word Arkplus became bold, but she didn't... The text apears
as its posted here.
The textfield is an html enabled.

Many thanks!

Pluda
kglad
3/22/2004 5:21:41 AM
if your

vars=A <b>Arkplus</b> surge como uma empresa inovadora cujo objectivo visa a
maximiza??o e optimiza??o da competitividade da nossa carteira de Clientes.&

line is in a text file that you're loading, you should have no problem. is
that line from a text file that you're loading?
Pluda
3/22/2004 9:24:50 AM
Yes, I'm loading the text into an html enabled textfield.

The text is bigguer than the exemple I've posted, but there isn't anything
"strange" in it.

I'm loading him in a swf that is then imported into another, would this be a
problem?

Thanks!

Pluda
Pluda
3/22/2004 11:44:05 AM
Hi Kglad,

Yes, you're wright!

The problem is what I've mentioned in my last post.

If I load the vars on my swf, they do became bold using the html tags,
however, I need this swf to be loaded by another one. Now the vars don't work.

If I use something like this

myvars = new LoadVars();
myvars.load("porque.txt");
myvars.onLoad = function(){
texto.text = myvars.vars;
}

the text is loaded. If in the first swf, bold letters apear, but if this swf
is loaded into anther, the text is also loaded, but no bold.

What I'm I supose to do?

Thanks

Pluda
Pluda
3/24/2004 2:21:57 PM
Hello,

I still haven't found a solution to this :-(

Is there any other way to load vars into one swf to another?

Thanks

kglad
3/24/2004 3:19:16 PM
you're ok with your LoadVars() object. it's your texto.text statement that's
causing the problem. try:

myvars = new LoadVars();
myvars.load("porque.txt");
myvars.onLoad = function() {
texto.htmlText = myvars.vars;
};
Pluda
3/24/2004 3:42:44 PM
Ok, I've got it!

Flash was confused with the name of my text, is that your saying?

But why did he did work ok if not loaded into anther swf?

Can't flash "read" the content of the "child" swf as he is?

Many Thanks Kglad, you are always a very usefull help to me :-) I'm learning a
lot whit your code!

Thanks

Pluda
kglad
3/24/2004 4:37:05 PM
no, flash wasn't confused. if you mean to assign html encoded text to a
html-enabled textfield you need to use <b>texto.htmlText=</b>, NOT
<b>texto.text=</b>.
it worked before because you didn't use a <b>texto.text=</b> statement. you
just loaded your variable into flash and then flash (correctly) assigned the
variable your html-enabled textfield.
AddThis Social Bookmark Button